Merge pull request #272794 from dcarosone/zpool-import-d

nixos/zfs: check pool state with -d, like import
This commit is contained in:
Ryan Lahfa
2024-01-12 20:07:24 +01:00
committed by GitHub
+1 -1
View File
@@ -71,7 +71,7 @@ let
done
poolReady() {
pool="$1"
state="$("${zpoolCmd}" import 2>/dev/null | "${awkCmd}" "/pool: $pool/ { found = 1 }; /state:/ { if (found == 1) { print \$2; exit } }; END { if (found == 0) { print \"MISSING\" } }")"
state="$("${zpoolCmd}" import -d "${cfgZfs.devNodes}" 2>/dev/null | "${awkCmd}" "/pool: $pool/ { found = 1 }; /state:/ { if (found == 1) { print \$2; exit } }; END { if (found == 0) { print \"MISSING\" } }")"
if [[ "$state" = "ONLINE" ]]; then
return 0
else