Split [zfs.sh] into multiple scripts inside a [zfs] directory, adjusted references in other files to reflect changes

This commit is contained in:
2026-08-01 22:24:18 -04:00
parent c293990fa2
commit c32c9abcd1
13 changed files with 324 additions and 289 deletions
+3 -3
View File
@@ -5,9 +5,9 @@ set -euo pipefail
baseDir="$(realpath "$(dirname "${0}")")"
disksById="$(ls -Ago /dev/disk/by-id/ | grep -v 'sr' | grep -v 'dm-' | grep -v 'nvme-eui.' | grep -v '\-part' | grep -v 'wwn-' | grep -v '_[1-9] -> ' | grep -v 'total' | sed -e 's|^.*\:[0-5][0-9] ||g')"
disks="$(lsblk -do name | grep -v 'loop' | grep -v 'sr' | grep -v 'zram' | grep -v 'NAME')"
networkInterfaces="$(ip -br addr show | sed -e 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')"
disksById="$(ls -Ago /dev/disk/by-id/ | awk '!/sr/&&!/dm-/&&!/nvme-eui\./&&!/\-part/&&!/wwn-/&&!/_[1-9] -> /&&NR!=1{print$7" -> "$9}')"
disks="$(lsblk -do name | awk 'NR!=1&&!/loop/&&!/sr/&&!/zram/')"
networkInterfaces="$(ip -br addr show | awk '!/^lo/&&!/tailscale/&&!/^wg/{print$1}')"
cat << EOF