diff sbin/fzfs @ 546:d28733400b18

Using jq: the '.a.b.c.["d"]' syntax in chains is 1.7+: use the old syntax '.a.b.c["d"]' instead. Since 1.7 a dot is allowed. See: https://github.com/jqlang/jq/issues/1168
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 10 Sep 2024 10:42:44 +0200
parents 566ecdd9e73b
children 847ae246f3cc
line wrap: on
line diff
--- a/sbin/fzfs	Tue Sep 10 10:13:59 2024 +0200
+++ b/sbin/fzfs	Tue Sep 10 10:42:44 2024 +0200
@@ -310,7 +310,7 @@
 
     if [ -x "${JQ}" ]; then
         /sbin/mount -t zfs -p --libxo=json,no-locale \
-        | LC_ALL=C "${JQ}" -r $'.mount.fstab.[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \
+        | LC_ALL=C "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \
         | LC_ALL=C /usr/bin/awk -F $'\\t+' -v OFS=$'\t' -v ds1="${_dsname}" -v ds2="${_dsname}/" $'{ if (($1 == ds1) || (index($1, ds2) == 1)) { print $1, $2; } }' \
         | LC_ALL=C /usr/bin/sort -t $'\t' -k 1 -r \
         | while IFS=$'\t' read -r _name _mp ; do