SVN: geninitrd/trunk/geninitrd
glen
glen at pld-linux.org
Mon Mar 19 21:20:59 CET 2012
Author: glen
Date: Mon Mar 19 21:20:59 2012
New Revision: 12506
Modified:
geninitrd/trunk/geninitrd
Log:
fix root= handling with initramfs & lvm
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Mon Mar 19 21:20:59 2012
@@ -807,22 +807,15 @@
if [ "$device" != '/dev/no_partition_found' -a ! -b $device ]; then
mknod $device b $maj $min
fi
- EOF
-
- add_linuxrc <<-EOF
- rootdev=$rootdev
- rootfs=$rootFs
- EOF
- add_linuxrc <<-'EOF'
if [ "$device" = '/dev/no_partition_found' ]; then
- device=$rootdev
+ device=$ROOT
fi
[ -n "$ROOTFSFLAGS" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
- mount -t $rootfs -r $device $ROOTFSFLAGS /newroot || echo "Mount of rootfs failed."
- init="$(echo "$CMDLINE" | busybox awk '/init=\// { gsub(/.*init=/,NIL,$0); gsub(/ .*/,NIL,$0); print }')"
+ mount -t $ROOTFS -r $device $ROOTFSFLAGS /newroot || echo "Mount of rootfs failed."
+ init=$INIT
if [ -z "$init" -o ! -x "/newroot$init" ]; then
init=/sbin/init
fi
@@ -1288,6 +1281,11 @@
EOF
mount_proc
+add_linuxrc <<-EOF
+ # builtin defaults from geninitrd
+ ROOT=$rootdev
+ ROOTFS=$rootFs
+EOF
add_linuxrc <<-'EOF'
read CMDLINE < /proc/cmdline
@@ -1304,6 +1302,9 @@
if [ "${arg##rootfsflags=}" != "${arg}" ]; then
ROOTFSFLAGS=${arg##rootfsflags=}
fi
+ if [ "${arg##init=}" != "${arg}" ]; then
+ INIT=${arg##init=}
+ fi
done
# make debugshell() invoke subshell if $DEBUGINITRD=sh
@@ -1312,7 +1313,7 @@
EOF
if is_yes "$RUN_SULOGIN_ON_ERR"; then
add_linuxrc <<-'EOF'
- echo "debug shell disabled by /etc/sysconfig/system:RUN_SULOGIN_ON_ERR setting"
+ echo "debug shell disabled by /etc/sysconfig/system: RUN_SULOGIN_ON_ERR setting"
EOF
else
add_linuxrc <<-'EOF'
More information about the pld-cvs-commit
mailing list