Added patch from Tim Steiner <tsteiner@nerdclub.net> to add a real_rootflags paramete...
authorChris Gianelloni <wolf31o2@gentoo.org>
Mon, 13 Nov 2006 19:32:42 +0000 (19:32 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Mon, 13 Nov 2006 19:32:42 +0000 (19:32 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@458 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
generic/linuxrc

index b5e2bbeca016d6b66e56d4ffea39d582e1e27d09..c7cbc07dd8388b87722083d428afb106b8d30a05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 2006-2006 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  13 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org> generic/linuxrc:
+  Added patch from Tim Steiner <tsteiner@nerdclub.net> to add a real_rootflags
+  parameter for bug #122672.
+
   13 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   generic/initrd.scripts, generic/linuxrc:
   Added patch to support resuming from encrypted swap. The patch was submitted
index ecf96c749ea518be02c06b19307b11ae4bf9cb8c..18565958451a109f82353995c6417ab408653cac 100644 (file)
@@ -45,6 +45,7 @@ CMDLINE="`cat /proc/cmdline`"
 # Scan CMDLINE for any specified real_root= or cdroot arguments
 REAL_ROOT=''
 FAKE_ROOT=''
+REAL_ROOTFLAGS=''
 for x in ${CMDLINE}
 do
        case "${x}" in
@@ -178,6 +179,9 @@ do
                crypt_swap\=*)
                        LUKS_SWAP=`parse_opt "${x}"`
                ;;
+               real_rootflags\=*)
+                       REAL_ROOTFLAGS=`parse_opt "${x}"`
+               ;;
        esac
 done
 
@@ -406,7 +410,12 @@ do
                        # mount ro so fsck doesn't barf later
 #                      REAL_ROOT_TYPE=`vol_id -t ${REAL_ROOT}`
 #                      mount -t ${REAL_ROOT_TYPE} -o ro ${REAL_ROOT} ${NEW_ROOT}
-                       mount -o ro ${REAL_ROOT} ${NEW_ROOT}
+                       if [ "${REAL_ROOTFLAGS}" = '' ]; then
+                               mount -o ro ${REAL_ROOT} ${NEW_ROOT}
+                       else
+                               good_msg "Using mount -o ro,${REAL_ROOTFLAGS}"
+                               mount -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}
+                       fi
                fi
                
                # If mount is successful break out of the loop