Merge pull request #49 from albertmichaelj/master

TARGETS not being correctly excluded if root filesystem is btrfs.
This commit is contained in:
James “Wes” Barnett
2017-07-12 16:09:09 -04:00
committed by GitHub

View File

@@ -161,8 +161,8 @@ fi
if [[ "$(findmnt -n -v --target / -o FSTYPE)" == "btrfs" ]]; then
EXCLUDE_UUID=$(findmnt -n -v -t btrfs --target / -o UUID)
TARGETS=$($ssh findmnt -n -v -t btrfs -o TARGET --list | grep -v $EXCLUDE_UUID)
UUIDS=$($ssh findmnt -n -v -t btrfs -o UUID --list | grep -v $EXCLUDE_UUID)
TARGETS=$($ssh findmnt -n -v -t btrfs -o UUID,TARGET --list | grep -v $EXCLUDE_UUID | awk '{print $2}')
UUIDS=$($ssh findmnt -n -v -t btrfs -o UUID,TARGET --list | grep -v $EXCLUDE_UUID | awk '{print $1}')
else
TARGETS=$($ssh findmnt -n -v -t btrfs -o TARGET --list)
UUIDS=$($ssh findmnt -n -v -t btrfs -o UUID --list)