RileyInkTheCat / Pacman-ZFS-Hook

Pacman Hook to create ZFS Snapshots on Pacman transactions.
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Supporting multiple zpools #2

Closed lietu closed 7 months ago

lietu commented 8 months ago

Skipping - values for bootfs and only grab the last one.

Output of zpool get bootfs on my system:

NAME      PROPERTY  VALUE         SOURCE
z8        bootfs    z8/ROOT/arch  local
zcorsair  bootfs    -             default

Doing this with -o value -pH makes it:

z8/ROOT/arch
-

Explicitly removing blank values with | grep -v '-':

z8/ROOT/arch

And | tail -n1 in case there are multiple remaining. I previously used just | tail -n1 when my pool names were different, the grep -v '-' fixes most of the issues, but the tail is there just in case.

RileyInkTheCat commented 7 months ago

Oh I totally missed this PR. Thank you so much for fixing this.