]> arthur.barton.de Git - ax-linux.git/commitdiff
btrfs-mksnapshot: allow unquoted LABEL in /etc/fstab
authorAlexander Barton <alex@barton.de>
Fri, 30 Aug 2013 17:07:41 +0000 (19:07 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 30 Aug 2013 17:07:41 +0000 (19:07 +0200)
btrfs/mksnapshot/btrfs-mksnapshot

index 8055c940b38422ca6235a9f4d25b5ad1e8dadd75..53bc0674974b0f9231447abecd7d183f261a35ab 100755 (executable)
@@ -52,7 +52,9 @@ done
 FS_NAME=`grep " btrfs " /etc/fstab \
        | grep "^LABEL=" \
        | grep " $VOLUME_PATH " \
-       | cut -d'"' -f2`
+       | cut -d'"' -f2 \
+       | cut -d'=' -f2- \
+       | cut -d' ' -f1`
 if [ -z "$FS_NAME" ]; then
        echo "$NAME: Failed to detect btrfs filesystem label for \"$VOLUME_PATH\"!"
        exit 1