linuxrc: default REAL_INIT to /sbin/init

master
Fabio Erculiani 12 years ago
parent 682acf0274
commit afea330cb1

@ -2096,7 +2096,7 @@ rootdev_init() {
_msg="${_msg}, init will likely fail..." _msg="${_msg}, init will likely fail..."
bad_msg "${_msg}" bad_msg "${_msg}"
fi fi
if [ ! -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ]; then if [ ! -x "${NEW_ROOT}${REAL_INIT}" ]; then
_msg="The filesystem ${REAL_ROOT}," _msg="The filesystem ${REAL_ROOT},"
_msg="${_msg} mounted at ${NEW_ROOT}" _msg="${_msg} mounted at ${NEW_ROOT}"
_msg="${_msg} does not contain a valid" _msg="${_msg} does not contain a valid"

@ -29,6 +29,7 @@ fi
CMDLINE=$(cat /proc/cmdline) CMDLINE=$(cat /proc/cmdline)
FAKE_ROOT='' FAKE_ROOT=''
FAKE_INIT='' FAKE_INIT=''
REAL_INIT='/sbin/init'
FAKE_ROOTFLAGS='' FAKE_ROOTFLAGS=''
INIT_OPTS='' INIT_OPTS=''
ROOTFSTYPE='auto' ROOTFSTYPE='auto'
@ -351,12 +352,12 @@ fi
rundebugshell "before entering switch_root" rundebugshell "before entering switch_root"
exec /sbin/switch_root -c "/dev/console" "${CHROOT}" \ exec /sbin/switch_root -c "/dev/console" "${CHROOT}" \
"${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" "${REAL_INIT}" "${INIT_OPTS}"
# If we get here, something bad has happened # If we get here, something bad has happened
splashcmd verbose splashcmd verbose
bad_msg "A fatal error has occured since ${REAL_INIT:-/sbin/init} did not" bad_msg "A fatal error has occured since ${REAL_INIT} did not"
bad_msg "boot correctly. Trying to open a shell..." bad_msg "boot correctly. Trying to open a shell..."
exec /bin/bash exec /bin/bash

Loading…
Cancel
Save