Magellan Linux

Diff of /trunk/initscripts/sysvinit/rc/rc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1664 by niro, Fri Jan 20 22:59:46 2012 UTC revision 2049 by niro, Wed Feb 20 08:00:29 2013 UTC
# Line 5  source /etc/conf.d/rc Line 5  source /etc/conf.d/rc
5  source ${rc_functions}  source ${rc_functions}
6    
7  # get mage version  # get mage version
8  MAGEVER="$(< /etc/mageversion)"  if [[ -f /etc/os-release ]]
9    then
10     MAGEVER="$(read_os_release version_id)"
11    elif [ -f /etc/mageversion ]
12    then
13     MAGEVER="$(< /etc/mageversion)"
14    else
15     MAGEVER="unkown"
16    fi
17    
18  # source kernel config if exists  # source kernel config if exists
19  [ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel  [ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel
# Line 28  if [[ $runlevel = sysinit ]] Line 36  if [[ $runlevel = sysinit ]]
36  then  then
37   rc_echo   rc_echo
38   rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}"   rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}"
39   rc_echo "Copyright 2001-2012 Niels Rogalla; http://magellan-linux.net"   rc_echo "Copyright 2001-2013 Niels Rogalla; http://magellan-linux.net"
40   rc_echo   rc_echo
41    
42   # mount proc filesystem, needed for bootsplash;   # mount proc filesystem, needed for bootsplash;
# Line 47  then Line 55  then
55   # mount sys file system before udev   # mount sys file system before udev
56   if [ -d /sys ]   if [ -d /sys ]
57   then   then
58   rc_print "Mounting sysfs file system ..."   if [ ! -e /sys/kernel/notes ]
59   mount -n -t sysfs sysfs /sys   then
60   evaluate_retval   rc_print "Mounting sysfs file system ..."
61     mount -n -t sysfs sysfs /sys
62     evaluate_retval
63     fi
64   else   else
65   rc_echo -e ${COLORED}"Fatal: mountpoint /sys missing ..."   rc_echo -e ${COLRED}"Fatal: mountpoint /sys missing ..."
66   rc_echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)."   rc_echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)."
67   rc_echo -e ${COLYELLOW}"It's essential for a 2.6 kernel."   rc_echo -e ${COLYELLOW}"It's essential for a 2.6 kernel."
68   fi   fi
# Line 109  then Line 120  then
120   mount -n -t tmpfs tmpfs "${svcdir}" -o rw,mode=0644,size="${svcsize}"k   mount -n -t tmpfs tmpfs "${svcdir}" -o rw,mode=0644,size="${svcsize}"k
121   evaluate_retval   evaluate_retval
122    
123     ## /run /tmp /var/lock
124     for i in /run /tmp /var/lock
125     do
126     if [ -d ${i} ]
127     then
128     rc_print "Mounting tmpfs at ${i} ..."
129     mount -n -t tmpfs tmpfs ${i} -o rw,nosuid,nodev,relatime
130     evaluate_retval
131     fi
132     done
133     # extra check for /var/lock
134     if [ -L /var/lock ]
135     then
136     mkdir -p /run/lock
137     rc_print "Mounting tmpfs at /run/lock ..."
138     mount -n -t tmpfs tmpfs /run/lock -o rw,nosuid,nodev,relatime
139     evaluate_retval
140     fi
141     # extra check if /run and /var/run are directories
142     if [ -d /run ] && [ -d /var/run ]
143     then
144     rc_print "Mounting tmpfs at /var/run ..."
145     mount -n -o bind /run /var/run
146     evaluate_retval
147     fi
148    
149   # load bootsplash   # load bootsplash
150   splash "rc_init" "${runlevel}"   splash "rc_init" "${runlevel}"
151  fi  fi
# Line 121  then Line 158  then
158    
159   # if requested save devices to a device tarball before halt   # if requested save devices to a device tarball before halt
160   # only for kernels >=2.6 *and* udev   # only for kernels >=2.6 *and* udev
161   # make shure that udev is mounted but *not* devfs --> /dev/.devfsd   # make sure that udev is mounted but *not* devfs --> /dev/.devfsd
162   if [[ ${RC_DEVICE_TARBALL} = yes ]] && \   if [[ ${RC_DEVICE_TARBALL} = yes ]] && \
163   [ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ]   [ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ]
164   then   then

Legend:
Removed from v.1664  
changed lines
  Added in v.2049