Hide useless errors when waiting for zpool to be ready
This commit is contained in:
parent
45a419ab5a
commit
c3e004799c
@ -74,7 +74,7 @@ let
|
||||
importLib = {zpoolCmd, awkCmd, cfgZfs}: ''
|
||||
poolReady() {
|
||||
pool="$1"
|
||||
state="$("${zpoolCmd}" import | "${awkCmd}" "/pool: $pool/ { found = 1 }; /state:/ { if (found == 1) { print \$2; exit } }; END { if (found == 0) { print \"MISSING\" } }")"
|
||||
state="$("${zpoolCmd}" import 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 New Issue
Block a user