Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support snapper 0.11.0 #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

D34DC3N73R
Copy link

@D34DC3N73R D34DC3N73R commented Apr 22, 2024

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

instead of using `-e 's/^SUBVOLUME[ ]*| //' -e 's/^SUBVOLUME[ ]*│ //'` combine into `-e 's/^SUBVOLUME[ ]*[|│] //'`
Copy link

@oryws oryws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been struggling with this for quite a bit on NixOS when trying to move to 24.05, nice fix

@D34DC3N73R
Copy link
Author

This is also needed with snapper version 0.12.0

niki-on-github pushed a commit to niki-on-github/snapraid-btrfs that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants