snapraid-btrfs
snapraid-btrfs copied to clipboard
Add sed script to trim whitespace around drive
Hit an issue where when parsing the snapper output there was whitespace after the drive meaning it was never matched against. This can be seen using the following command. Adding the additional script to trim the drive resolves the issue and the configurations are now found.
$:~$ snapper -c mergerfsdisk4 get-config | sed -e '/^SUBVOLUME /!d' -e 's/^SUBVOLUME[ ]*| //' -e 's/\s+//g' | tr " " "*" | tr "\t" "&"
/mnt/disk4**********