snapraid-btrfs icon indicating copy to clipboard operation
snapraid-btrfs copied to clipboard

Support snapper 0.11.0

Open D34DC3N73R opened this issue 1 year ago • 1 comments

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

D34DC3N73R avatar Apr 22 '24 21:04 D34DC3N73R