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>
# 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.
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
real_init=*)
REAL_INIT=${x#*=}
;;
+ init=*)
+ FAKE_INIT=${x#*=}
+ ;;
init_opts=*)
INIT_OPTS=${x#*=}
;;
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