diff options
-rwxr-xr-x | sbin/init.linux.sh | 10 | ||||
-rwxr-xr-x | sbin/rc | 21 |
2 files changed, 8 insertions, 23 deletions
diff --git a/sbin/init.linux.sh b/sbin/init.linux.sh index 6c14765..d144d84 100755 --- a/sbin/init.linux.sh +++ b/sbin/init.linux.sh @@ -21,13 +21,13 @@ echo -e "Press ${GOOD}I${NORMAL} to enter interactive boot mode" echo check_statedir /proc +check_statedir /dev -# openvz workaround -# /proc/self exists: we're on linux-vserver -# /proc/self doesn't exist: we're on openvz -[[ -e /proc/self ]] || "${svclib}"/ovz-mount-proc +# OpenVZ needs to mount proc from inside +if [[ ! -e /proc/self ]]; then + mount -t proc none /proc +fi -check_statedir /dev source "${svclib}"/sh/init-common-post.sh @@ -30,20 +30,17 @@ get_critical_services() { # Save $1 argv1=$1 -# we need this to prevent a warning below -[[ ! -e ${svcdir}/softlevel ]] && touch ${svcdir}/softlevel - # First time boot stuff goes here. Note that 'sysinit' is an internal runlevel # used to bring up local filesystems, and should not be started with /sbin/rc # directly ... -if [[ ${argv1} = "sysinit" || ( ${argv1} = "boot" && "$(<${svcdir}/softlevel)" != "sysinit" ) ]] +if [[ ${argv1} = "sysinit" ]] then source "${svclib}"/sh/init.sh || { echo "Could not source init.sh !?" exit 1 } - [[ ${argv1} = "boot" ]] || exit 0 + exit 0 fi # Sysinit ends here if [[ ${argv1} == "boot" ]] @@ -244,12 +241,6 @@ if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then source /etc/init.d/halt.sh - # we just die here since we have no init - # and we should be the last running process - if [[ ${RC_INITSTYLE_HACK} == "yes" ]] ; then - exit 0 - fi - if [[ ${SOFTLEVEL} == "reboot" ]] ; then source /etc/init.d/reboot.sh else @@ -300,13 +291,7 @@ rm -rf "${svcdir}/softscripts.old" &>/dev/null rm -rf "${svcdir}/failed" &>/dev/null # If we were in the boot runlevel, it is done now ... -if [[ -n ${BOOT} ]] ; then - unset BOOT - - if [[ "${RC_INITSTYLE_HACK}" = "yes" ]]; then - /sbin/rc default - fi -fi +[[ -n ${BOOT} ]] && unset BOOT # Remove the cached CONSOLETYPE unset CONSOLETYPE |