Add --real-root=<foo> parameter to specify a default for real_root= in the initramfs for gentoo bug #249783

cleanup-cruft
Andrew Gaffney 16 years ago
parent 570cd92979
commit 462e35fe87

@ -2,6 +2,11 @@
# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# Distributed under the GPL v2
13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/linuxrc,
gen_cmdline.sh, gen_determineargs.sh, gen_initramfs.sh:
Add --real-root=<foo> parameter to specify a default for real_root= in the
initramfs for gentoo bug #249783
12 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> -arch/alpha/busy-config,
-arch/arm/busy-config, -arch/ia64/busy-config, -arch/mips/busy-config,
-arch/parisc/busy-config, -arch/parisc64/busy-config,

@ -41,7 +41,6 @@ quiet_kmsg
CMDLINE=`cat /proc/cmdline`
# Scan CMDLINE for any specified real_root= or cdroot arguments
REAL_ROOT=''
FAKE_ROOT=''
REAL_ROOTFLAGS=''
CRYPT_SILENT=0

@ -92,6 +92,7 @@ longusage() {
echo " --no-busybox Do not include busybox in the initramfs."
echo " --unionfs Include support for unionfs"
echo " --netboot Create a self-contained env in the initramfs"
echo " --real-root=<foo> Specify a default for real_root=
echo " Internals"
echo " --arch-override=<arch> Force to arch instead of autodetect"
echo " --cachedir=<dir> Override the default cache location"
@ -254,6 +255,10 @@ parse_cmdline() {
CMD_NETBOOT=1
print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}"
;;
--real-root=*)
CMD_REAL_ROOT=`parse_opt "$*"`
print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}"
;;
--slowusb)
CMD_SLOWUSB=1
print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"

@ -105,6 +105,7 @@ determine_real_args() {
set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes"
set_config_with_override 1 UNIONFS CMD_UNIONFS
set_config_with_override 1 NETBOOT CMD_NETBOOT
set_config_with_override 2 REAL_ROOT CMD_REAL_ROOT
set_config_with_override 1 DISKLABEL CMD_DISKLABEL
set_config_with_override 1 LUKS CMD_LUKS
set_config_with_override 1 MDADM CMD_MDADM

@ -451,6 +451,11 @@ append_auxilary() {
else
cp "${GK_SHARE}/defaults/initrd.defaults" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
fi
if [ -n "${REAL_ROOT}" ]
then
sed -i "s/^REAL_ROOT=.*$/REAL_ROOT='${REAL_ROOT}'/" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
fi
echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
for group_modules in ${!MODULES_*}; do

Loading…
Cancel
Save