--- trunk/magellan-initscripts/etc/rc.d/init.d/rc 2010/07/14 14:37:57 1105 +++ trunk/magellan-initscripts/etc/rc.d/init.d/rc 2011/03/11 17:18:42 1248 @@ -26,16 +26,16 @@ if [[ $runlevel = sysinit ]] then - echo - echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}" - echo -e "Copyright 2001-2010 Niels Rogalla; http://magellan-linux.net" - echo + rc_echo + rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}" + rc_echo "Copyright 2001-2011 Niels Rogalla; http://magellan-linux.net" + rc_echo # mount proc filesystem, needed for bootsplash; # no use of '/etc/rc.d/init.d/mountproc' anymore if [ ! -e /proc/mounts ] then - echo -e ${COLOREDSTAR}"Mounting proc file system ..." + rc_print "Mounting proc file system ..." mount -n /proc evaluate_retval fi @@ -47,20 +47,17 @@ # mount sys file system before udev if [ -d /sys ] then - echo -e ${COLOREDSTAR}"Mounting sysfs file system ..." + rc_print "Mounting sysfs file system ..." mount -n -t sysfs sysfs /sys evaluate_retval else - echo -e ${COLORED}"Fatal: mountpoint /sys missing ..." - echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)." - echo -e ${COLYELLOW}"It's essential for a 2.6 kernel." + rc_echo -e ${COLORED}"Fatal: mountpoint /sys missing ..." + rc_echo -e ${COLYELLOW}"Please create the directory /sys (mkdir -p /sys)." + rc_echo -e ${COLYELLOW}"It's essential for a 2.6 kernel." fi - - #### load udev|mdev| #### + # start device management start_devicemanager - ## end udev|mdev ## - ## load devpts ## # devfs/udev with 2.6 has no ptys, so devpts is also needed @@ -74,25 +71,25 @@ if [ ! -d "/dev/pts" -a -e "/dev/.devfsd" ] && is_fs_mounted devfs then mkdir -p /dev/pts &> /dev/null || \ - echo "Could not create /dev/pts !" + rc_echo "Could not create /dev/pts !" fi # now mount devpts if [ -d /dev/pts ] then - echo -e ${COLOREDSTAR}"Mounting devpts at /dev/pts ..." + rc_print "Mounting devpts at /dev/pts ..." mount -n -t devpts -o gid=4,mode=0620 devpts /dev/pts evaluate_retval fi else # devpts is not supported, give a warning - echo -e ${COLRED}"No devpts filesystem found ..." - echo -e ${COLYELLOW}"Your Kernel doesn't support the devpts filesystem." - echo -e ${COLYELLOW}"Devfs/Udev with a kernel-2.6.x needs devpts," - echo -e ${COLYELLOW}"or no pty's are available." - echo -e ${COLYELLOW}"Please make sure that this is enabled in your kernel." - echo - echo -e ${COLYELLOW}"Press any key to continue ..." + rc_echo -e ${COLRED}"No devpts filesystem found ..." + rc_echo -e ${COLYELLOW}"Your Kernel doesn't support the devpts filesystem." + rc_echo -e ${COLYELLOW}"Devfs/Udev with a kernel-2.6.x needs devpts," + rc_echo -e ${COLYELLOW}"or no pty's are available." + rc_echo -e ${COLYELLOW}"Please make sure that this is enabled in your kernel." + rc_echo + rc_echo -e ${COLYELLOW}"Press any key to continue ..." read fi ## end devpts ## @@ -101,14 +98,14 @@ ## load usbfs ## if kernel_supports_fs usbfs then - echo -e ${COLOREDSTAR}"Mounting usbfs at /proc/bus/usb ..." + rc_print "Mounting usbfs at /proc/bus/usb ..." mount -n -t usbfs usbfs /proc/bus/usb evaluate_retval fi ## end usbfs ## ## services state dir ## - echo -e ${COLOREDSTAR}"Mounting tmpfs at ${svcdir} ..." + rc_print "Mounting tmpfs at ${svcdir} ..." mount -n -t tmpfs tmpfs "${svcdir}" -o rw,mode=0644,size="${svcsize}"k evaluate_retval @@ -128,20 +125,20 @@ if [[ ${RC_DEVICE_TARBALL} = yes ]] && \ [ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ] then - echo -e ${COLOREDSTAR}"Saving /dev device nodes ..." + rc_print "Saving /dev device nodes ..." ( cd /dev; tar -jclpf "/tmp/devices-$$.tar.bz2" * &> /dev/null ) mv -f "/tmp/devices-$$.tar.bz2" /lib/udev/state/devices.tar.bz2 evaluate_retval fi - # stop udev|mdev now + # stop device management stop_devicemanager fi if [ "$runlevel" = "" ] then - echo "Usage: $0 " >&2 + rc_echo "Usage: $0 " >&2 exit 1 fi @@ -151,7 +148,7 @@ if [ ! -d $rc_base/rc$runlevel.d ] then - echo "$rc_base/rc$runlevel.d does not exist" + rc_echo "$rc_base/rc$runlevel.d does not exist" exit 1 fi @@ -171,8 +168,8 @@ if [ ! -f $prev_start ] && [ ! -f $sysinit_start ] then $WARNING - echo "$i can't be executed because it was" - echo "not started in the previous runlevel ($previous)" + rc_echo "$i can't be executed because it was" + rc_echo "not started in the previous runlevel ($previous)" $NORMAL continue fi