snapraid-btrfs
snapraid-btrfs copied to clipboard
Support snapper 0.11.0
Snapper 0.11.0 uses │ (light vertical box drawing character) instead of | (pipe) so sed SUBVOLUME string matching fails, which in turn gives the error message "snapraid-btrfs: No snapper configs found for any data drives in /etc/snapraid.conf". This PR adds the vertical box drawing character to the sed command so either string is removed and snapper configs are matched appropriately. There is also a commit to update the copyright years.
using original code with snapper 0.11.0
$ snapper -c data1 get-config 2>/dev/null | sed -e '/^SUBVOLUME /!d' -e 's/^SUBVOLUME[ ]*| //'
SUBVOLUME │ /mnt/data/1
using PR code with snapper 0.11.0
$ snapper -c data1 get-config 2>/dev/null | sed -e '/^SUBVOLUME /!d' -e 's/^SUBVOLUME[ ]*[|│] //'
/mnt/data/1