From afea330cb1f72c56f97ca3730523db2d70eae382 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 11 Aug 2013 11:04:48 +0200 Subject: [PATCH] linuxrc: default REAL_INIT to /sbin/init --- defaults/initrd.scripts | 2 +- defaults/linuxrc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index df95728..671ab98 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -2096,7 +2096,7 @@ rootdev_init() { _msg="${_msg}, init will likely fail..." bad_msg "${_msg}" fi - if [ ! -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ]; then + if [ ! -x "${NEW_ROOT}${REAL_INIT}" ]; then _msg="The filesystem ${REAL_ROOT}," _msg="${_msg} mounted at ${NEW_ROOT}" _msg="${_msg} does not contain a valid" diff --git a/defaults/linuxrc b/defaults/linuxrc index fcd8a0c..533e0c0 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -29,6 +29,7 @@ fi CMDLINE=$(cat /proc/cmdline) FAKE_ROOT='' FAKE_INIT='' +REAL_INIT='/sbin/init' FAKE_ROOTFLAGS='' INIT_OPTS='' ROOTFSTYPE='auto' @@ -351,12 +352,12 @@ fi rundebugshell "before entering switch_root" 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 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..." exec /bin/bash