From 4b90499478efd9ef9f6b5c1724603a060aebd5a6 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 30 Aug 2013 19:07:41 +0200 Subject: [PATCH] btrfs-mksnapshot: allow unquoted LABEL in /etc/fstab --- btrfs/mksnapshot/btrfs-mksnapshot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btrfs/mksnapshot/btrfs-mksnapshot b/btrfs/mksnapshot/btrfs-mksnapshot index 8055c94..53bc067 100755 --- a/btrfs/mksnapshot/btrfs-mksnapshot +++ b/btrfs/mksnapshot/btrfs-mksnapshot @@ -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 -- 2.39.2