diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | defaults/linuxrc | 8 |
2 files changed, 11 insertions, 0 deletions
@@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 15 Oct 2012; Peter Hjalmarsson <xake@rymdraket.net> defaults/linuxrc: + Support using init= on the command line. + 15 Oct 2012; Peter Hjalmarsson <xake@rymdraket.net> README, doc/genkernel.8.txt, gen_bootloader.sh, genkernel: Update the documentation to reflect current status re real_root/init. diff --git a/defaults/linuxrc b/defaults/linuxrc index 48446ba..1bc09a7 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -36,6 +36,7 @@ quiet_kmsg CMDLINE=$(cat /proc/cmdline) # Scan CMDLINE for any specified real_root= or cdroot arguments FAKE_ROOT='' +FAKE_INIT='' REAL_ROOTFLAGS='' ROOTFSTYPE='auto' CRYPT_SILENT=0 @@ -56,6 +57,9 @@ do real_init=*) REAL_INIT=${x#*=} ;; + init=*) + FAKE_INIT=${x#*=} + ;; init_opts=*) INIT_OPTS=${x#*=} ;; @@ -263,6 +267,10 @@ if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_ROOT}" != "/dev then REAL_ROOT="${FAKE_ROOT}" fi +if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_INIT}" != "/linuxrc" \) ] +then + REAL_INIT="${FAKE_INIT}" +fi # Set variables based on the value of REAL_ROOT case "${REAL_ROOT}" in |