]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
Mount rootfs from initramfs with rootfsflags options.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 3 Feb 2011 18:45:09 +0000 (18:45 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 3 Feb 2011 18:45:09 +0000 (18:45 +0000)
svn-id: @12114

geninitrd

index 1ec46cfc47fe2e894a10420bffaa7e82b6e1f7a8..f2cc59d9a459b1bbc6984abb602c0cfe11fcafd8 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -764,7 +764,9 @@ initrd_gen_initramfs_switchroot() {
                        device=$rootdev
                fi
 
-               mount -t $rootfs -r $device /newroot
+               [ -n "$ROOTFSFLAG" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
+
+               mount -t $rootfs -r $device $ROOTFSFLAGS /newroot
                init="$(echo "$CMDLINE" | busybox awk '/init=\// { gsub(/.*init=/,NIL,$0); gsub(/ .*/,NIL,$0); print }')"
                if [ -z "$init" -o ! -x "/newroot$init" ]; then
                        init=/sbin/init
@@ -1229,6 +1231,9 @@ add_linuxrc <<-'EOF'
                if [ "${arg##root=}" != "${arg}" ]; then
                        ROOT=${arg##root=}
                fi
+               if [ "${arg##rootfsflags=}" != "${arg}" ]; then
+                       ROOTFSFLAGS=${arg##rootfsflags=}
+               fi
        done
 
        # make debugshell() invoke subshell if $DEBUGINITRD=sh
This page took 0.246794 seconds and 4 git commands to generate.