blob: 40edad9cdafe97f641caa60eeb054c30aad53172 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Functions used by rc.sysinit
# Modified versions for linhes live systems
f_header ()
{
cR='\e[31m' cY='\e[1;33m' cN='\e[0m' cW='\e[1;37m'
echo " "
printsep
printf " ${cR}LinHes ${cY}Installation${cN}/${cY}Live${cW} CDROM${cN}. "
printsep
echo " "
}
f_fscheck ()
{
stat_busy "Initializing /etc/mtab"
#/bin/mount -n -o remount,rw /
/bin/rm -f /etc/mtab*
# Make entries for aufs/unionfs, tmpfs and live medium in /etc/mtab
grep "^aufs */ " /proc/mounts >>/etc/mtab
grep "^unionfs */ " /proc/mounts >>/etc/mtab
grep "^tmpfs */.livesys " /proc/mounts >>/etc/mtab
if [ -d /.livesys/medium/live ]; then
grep " /.livesys/medium " /proc/mounts >>/etc/mtab
fi
f_mountlocal
stat_done
if [ -z "$( cat /etc/fstab | grep "^#KEEP" )" ]; then
stat_busy "Generating fresh /etc/fstab"
/opt/linhes-live/bin/gen_fstab -l
stat_done
fi
# now mount all the local filesystems
stat_busy "Mounting Local Filesystems"
/bin/mount -a -t $NETFS
stat_done
}
f_swapon ()
{
#+*** Copy session-save flag-file (if it exists)
[ -f /live/nosave ] && cp /live/nosave /.livesys
#-***
#*** Conditional swap activation
if [ -e /.livesys/swapon ]; then
status "Activating Swap" /sbin/swapon -a
fi
}
f_loadmodules()
{
CMDLINE=$(cat /proc/cmdline)
echo $CMDLINE | grep -q modules
if [ $? -eq 0 ]
then
TEMPVAR=${CMDLINE#* modules=}
CMDMODULES=${TEMPVAR%% *}
mymod=`echo $CMDMODULES|/bin/sed 's|-|_|g' |/bin/sed 's|,| |g'`
stat_busy "Loading CMD module"
for mod in $mymod
do
/sbin/modprobe $mod
done
stat_done
fi
}
|