]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
usrmount: Fix miss-detection of btrfs subvolumes.
authorColin Guthrie <colin@mageia.org>
Fri, 3 May 2013 16:16:05 +0000 (17:16 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 6 May 2013 12:06:07 +0000 (14:06 +0200)
This causes the root FS options to be incorrectly applied to to /usr
In some cases this can cause boot failure e.g. due to and XFS /usr
not supporting the 'acl' option from the ext4 root FS.

https://bugs.mageia.org/show_bug.cgi?id=9884

modules.d/98usrmount/mount-usr.sh

index a4a66aec23f40d69a766ebeb6d1352ea2a1cd5f4..de7dcc2276a91cd274ac8c85bc9611a792ed683b 100755 (executable)
@@ -61,14 +61,14 @@ mount_usr()
                 LABEL=*)
                     _dev="$(echo $_dev | sed 's,/,\\x2f,g')"
                     _dev="/dev/disk/by-label/${_dev#LABEL=}"
-                   ;;
+                    ;;
                 UUID=*)
                     _dev="${_dev#block:}"
                     _dev="/dev/disk/by-uuid/${_dev#UUID=}"
                     ;;
             esac
             if strstr "$_opts" "subvol=" && \
-                [ "${root#block:}" -ef $_dev ]
+                [ "${root#block:}" -ef $_dev ] && \
                 [ -n "$rflags" ]; then
                 # for btrfs subvolumes we have to mount /usr with the same rflags
                 rflags=$(filtersubvol "$rflags")