--- trunk/busybox-initscripts/rc/rc 2011/01/27 20:42:23 1196 +++ trunk/busybox-initscripts/rc/rc 2011/01/27 20:42:51 1197 @@ -7,41 +7,31 @@ # source kernel config if exists [ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel -# prefer mdev if it is present, always fall back to udev -# these settings can be overriden via /etc/conf.d/kernel -if [[ -z ${RC_DEVICEMANAGER} ]] -then - if [[ -e ${rc_base}/init.d/mdev ]] - then - RC_DEVICEMANAGER="mdev" - elif [[ -e ${rc_base}/init.d/udev ]] - then - RC_DEVICEMANAGER="udev" - fi -fi - -# load device management hooks -source ${rc_base}/init.d/${RC_DEVICEMANAGER} - # get mage version MAGEVER="$(< /etc/mageversion)" -trap "" INT QUIT TSTP +# source kernel config if exists +[ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel -[[ ! -z $1 ]] && runlevel=$1 +# override devicemanager helper functions +if [[ ${RC_DEVICEMANAGER} = udev ]] && [[ -f ${rc_base}/init.d/udev ]] +then + source ${rc_base}/init.d/udev -if [[ -z ${runlevel} ]] +elif [[ ${RC_DEVICEMANAGER} = mdev ]] && [[ -f ${rc_base}/init.d/mdev ]] then - echo "Usage: $0 " >&2 - exit 1 + source ${rc_base}/init.d/mdev fi +trap "" INT QUIT TSTP + +[ "$1" != "" ] && runlevel=$1 if [[ $runlevel = sysinit ]] then rc_echo rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}" - rc_echo -e "Copyright 2001-2010 Niels Rogalla; http://magellan-linux.net" + rc_echo "Copyright 2001-2011 Niels Rogalla; http://magellan-linux.net" rc_echo # mount proc filesystem, needed for bootsplash;