nixos/zfs: check pool state with -d, like import
This can avoid unnecessary wait-looping for pool to be 'ready' on some systems when the paths don't match
This commit is contained in:
parent
2c7f3c0fb7
commit
88f50101ac
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue