Support using init= on the command line

We do not support ramdisk, only initramfs nowdays.
So init= is a dead command, and we may as well have it do the same as
it does for dracut and in the Linux kernel documentation.
(Use rdinit to choose the initramfs init file)

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
cleanup-cruft
Peter Hjalmarsson 13 years ago committed by Robin H. Johnson
parent a9a3c6d173
commit 7e224199ff

@ -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.

@ -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

Loading…
Cancel
Save