aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hjalmarsson <xake@rymdraket.net>2012-04-09 20:03:01 +0200
committerRobin H. Johnson <robbat2@gentoo.org>2012-10-15 17:02:31 -0700
commit7e224199ffbf67af99e57d4aa2cf3a7a625b87ac (patch)
tree69efb525170eb65e1796cdd40ef76da08fabc1f1
parentUpdate the documentation to reflect current status (diff)
downloadgenkernel-7e224199ffbf67af99e57d4aa2cf3a7a625b87ac.tar.gz
genkernel-7e224199ffbf67af99e57d4aa2cf3a7a625b87ac.tar.bz2
genkernel-7e224199ffbf67af99e57d4aa2cf3a7a625b87ac.zip
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>
-rw-r--r--ChangeLog3
-rwxr-xr-xdefaults/linuxrc8
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dfe39e2..023016b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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