]> arthur.barton.de Git - ax-linux.git/blobdiff - btrfs/mksnapshot/btrfs-mksnapshot
btrfs-mksnapshot: allow unquoted LABEL in /etc/fstab
[ax-linux.git] / 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