Currently, since there are no UUIDs listed when TARGETS is computed,

then nothing is excluded even if a number of the mounts shouldn't be
there. This fixes that and ensures that the UUIDs are correctl listed
with the right mount point. This was originall broken in commit c4f12235ae.
This commit is contained in:
Michael Albert
2017-07-12 10:47:20 -04:00
parent 9d3be2c90f
commit 69f388de11

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,TARKET --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)