]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
strip block: off root= when using the mount hooks
authorDavid Dillow <dave@thedillows.org>
Tue, 2 Jun 2009 01:43:07 +0000 (21:43 -0400)
committerDavid Dillow <dave@thedillows.org>
Tue, 2 Jun 2009 01:43:07 +0000 (21:43 -0400)
I'm not sure they are still used, but if so they need to
trim the prefix.

modules.d/95rootfs-block/mount-root.sh

index 77a6b37d5d6ebcff5b7b9360befb373cd56d71a5..a5741d16749600e4e79699794dfa954102a2def6 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
-if [ ! -s /.resume -a "$root" ]; then
-    mount ${fstype:--t auto} -o "$rflags" "$root" "$NEWROOT" && ROOTFS_MOUNTED=yes
+if [ ! -s /.resume -a -n "$root" -a -z "${root%%block:*}" ]; then
+    mount ${fstype:--t auto} -o "$rflags" "${root#block:}" "$NEWROOT" && ROOTFS_MOUNTED=yes
 fi