needless awk

This commit is contained in:
наб 2024-02-29 00:16:49 +01:00
parent f0dfcc2110
commit d3d43f281b
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1

View File

@ -31,7 +31,7 @@ done
if [ "$root" = "zfs:AUTO" ] ; then
BOOTFS="$(zpool list -H -o bootfs | awk '!/^-$/ {print; exit}')"
BOOTFS="$(zpool list -H -o bootfs | while read -r b; do [ "$b" = '-' ] || { printf '%s\n' "$b"; exit; }; done)"
else
BOOTFS="${root##zfs:}"
BOOTFS="${BOOTFS##ZFS=}"