Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/rc

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

revision 1247 by niro, Wed Jul 14 14:37:57 2010 UTC revision 1248 by niro, Fri Mar 11 17:18:42 2011 UTC
# Line 26  trap "" INT QUIT TSTP Line 26  trap "" INT QUIT TSTP
26    
27  if [[ $runlevel = sysinit ]]  if [[ $runlevel = sysinit ]]
28  then  then
29   echo   rc_echo
30   echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}"   rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}"
31   echo -e "Copyright 2001-2010 Niels Rogalla; http://magellan-linux.net"   rc_echo "Copyright 2001-2011 Niels Rogalla; http://magellan-linux.net"
32   echo   rc_echo
33    
34   # mount proc filesystem, needed for bootsplash;   # mount proc filesystem, needed for bootsplash;
35   # no use of '/etc/rc.d/init.d/mountproc' anymore   # no use of '/etc/rc.d/init.d/mountproc' anymore
36   if [ ! -e /proc/mounts ]   if [ ! -e /proc/mounts ]
37   then   then
38   echo -e ${COLOREDSTAR}"Mounting proc file system ..."   rc_print "Mounting proc file system ..."
39   mount -n /proc   mount -n /proc
40   evaluate_retval   evaluate_retval
41   fi   fi
# Line 47  then Line 47  then
47   # mount sys file system before udev   # mount sys file system before udev
48   if [ -d /sys ]   if [ -d /sys ]
49   then   then
50   echo -e ${COLOREDSTAR}"Mounting sysfs file system ..."   rc_print "Mounting sysfs file system ..."
51   mount -n -t sysfs sysfs /sys   mount -n -t sysfs sysfs /sys
52   evaluate_retval   evaluate_retval
53   else   else
54   echo -e ${COLORED}"Fatal: mountpoint /sys missing ..."   rc_echo -e ${COLORED}"Fatal: mountpoint /sys missing ..."
55   echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)."   rc_echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)."
56   echo -e ${COLYELLOW}"It's essential for a 2.6 kernel."   rc_echo -e ${COLYELLOW}"It's essential for a 2.6 kernel."
57   fi   fi
58    
59     # start device management
  #### load udev|mdev| ####  
60   start_devicemanager   start_devicemanager
  ## end udev|mdev ##  
   
61    
62   ## load devpts ##   ## load devpts ##
63   # devfs/udev with 2.6 has no ptys, so devpts is also needed   # devfs/udev with 2.6 has no ptys, so devpts is also needed
# Line 74  then Line 71  then
71   if [ ! -d "/dev/pts" -a -e "/dev/.devfsd" ] && is_fs_mounted devfs   if [ ! -d "/dev/pts" -a -e "/dev/.devfsd" ] && is_fs_mounted devfs
72   then   then
73   mkdir -p /dev/pts &> /dev/null || \   mkdir -p /dev/pts &> /dev/null || \
74   echo "Could not create /dev/pts !"   rc_echo "Could not create /dev/pts !"
75   fi   fi
76    
77   # now mount devpts   # now mount devpts
78   if [ -d /dev/pts ]   if [ -d /dev/pts ]
79   then   then
80   echo -e ${COLOREDSTAR}"Mounting devpts at /dev/pts ..."   rc_print "Mounting devpts at /dev/pts ..."
81   mount -n -t devpts -o gid=4,mode=0620 devpts /dev/pts   mount -n -t devpts -o gid=4,mode=0620 devpts /dev/pts
82   evaluate_retval   evaluate_retval
83   fi   fi
84   else   else
85   # devpts is not supported, give a warning   # devpts is not supported, give a warning
86   echo -e ${COLRED}"No devpts filesystem found ..."   rc_echo -e ${COLRED}"No devpts filesystem found ..."
87   echo -e ${COLYELLOW}"Your Kernel doesn't support the devpts filesystem."   rc_echo -e ${COLYELLOW}"Your Kernel doesn't support the devpts filesystem."
88   echo -e ${COLYELLOW}"Devfs/Udev with a kernel-2.6.x needs devpts,"   rc_echo -e ${COLYELLOW}"Devfs/Udev with a kernel-2.6.x needs devpts,"
89   echo -e ${COLYELLOW}"or no pty's are available."   rc_echo -e ${COLYELLOW}"or no pty's are available."
90   echo -e ${COLYELLOW}"Please make sure that this is enabled in your kernel."   rc_echo -e ${COLYELLOW}"Please make sure that this is enabled in your kernel."
91   echo   rc_echo
92   echo -e ${COLYELLOW}"Press any key to continue ..."   rc_echo -e ${COLYELLOW}"Press any key to continue ..."
93   read   read
94   fi   fi
95   ## end devpts ##   ## end devpts ##
# Line 101  then Line 98  then
98   ## load usbfs ##   ## load usbfs ##
99   if kernel_supports_fs usbfs   if kernel_supports_fs usbfs
100   then   then
101   echo -e ${COLOREDSTAR}"Mounting usbfs at /proc/bus/usb ..."   rc_print "Mounting usbfs at /proc/bus/usb ..."
102   mount -n -t usbfs usbfs /proc/bus/usb   mount -n -t usbfs usbfs /proc/bus/usb
103   evaluate_retval   evaluate_retval
104   fi   fi
105   ## end usbfs ##   ## end usbfs ##
106    
107   ## services state dir ##   ## services state dir ##
108   echo -e ${COLOREDSTAR}"Mounting tmpfs at ${svcdir} ..."   rc_print "Mounting tmpfs at ${svcdir} ..."
109   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
110   evaluate_retval   evaluate_retval
111    
# Line 128  then Line 125  then
125   if [[ ${RC_DEVICE_TARBALL} = yes ]] && \   if [[ ${RC_DEVICE_TARBALL} = yes ]] && \
126   [ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ]   [ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ]
127   then   then
128   echo -e ${COLOREDSTAR}"Saving /dev device nodes ..."   rc_print "Saving /dev device nodes ..."
129   ( cd /dev; tar -jclpf "/tmp/devices-$$.tar.bz2" * &> /dev/null )   ( cd /dev; tar -jclpf "/tmp/devices-$$.tar.bz2" * &> /dev/null )
130   mv -f "/tmp/devices-$$.tar.bz2" /lib/udev/state/devices.tar.bz2   mv -f "/tmp/devices-$$.tar.bz2" /lib/udev/state/devices.tar.bz2
131   evaluate_retval   evaluate_retval
132   fi   fi
133    
134   # stop udev|mdev now   # stop device management
135   stop_devicemanager   stop_devicemanager
136  fi  fi
137    
138    
139  if [ "$runlevel" = "" ]  if [ "$runlevel" = "" ]
140  then  then
141   echo "Usage: $0 <runlevel>" >&2   rc_echo "Usage: $0 <runlevel>" >&2
142   exit 1   exit 1
143  fi  fi
144    
# Line 151  previous=$PREVLEVEL Line 148  previous=$PREVLEVEL
148    
149  if [ ! -d $rc_base/rc$runlevel.d ]  if [ ! -d $rc_base/rc$runlevel.d ]
150  then  then
151   echo "$rc_base/rc$runlevel.d does not exist"   rc_echo "$rc_base/rc$runlevel.d does not exist"
152   exit 1   exit 1
153  fi  fi
154    
# Line 171  then Line 168  then
168   if [ ! -f $prev_start ] && [ ! -f $sysinit_start ]   if [ ! -f $prev_start ] && [ ! -f $sysinit_start ]
169   then   then
170   $WARNING   $WARNING
171   echo "$i can't be executed because it was"   rc_echo "$i can't be executed because it was"
172   echo "not started in the previous runlevel ($previous)"   rc_echo "not started in the previous runlevel ($previous)"
173   $NORMAL   $NORMAL
174   continue   continue
175   fi   fi

Legend:
Removed from v.1247  
changed lines
  Added in v.1248