diff options
author | Andrew Dunham <andrew@du.nham.ca> | 2018-10-16 02:45:25 -0700 |
---|---|---|
committer | Andrew Dunham <andrew@du.nham.ca> | 2018-10-16 02:45:25 -0700 |
commit | c3e004799c8fbc9c26d4178004accf991714cff7 (patch) | |
tree | 9d2d36a00b28ce4c538b4f161f9f34b5e60f9bae /nixos/modules/tasks/filesystems | |
parent | 45a419ab5a23c93421c18f3d9cde015ded22e712 (diff) | |
download | nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar.gz nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar.bz2 nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar.lz nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar.xz nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.tar.zst nixlib-c3e004799c8fbc9c26d4178004accf991714cff7.zip |
Hide useless errors when waiting for zpool to be ready
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 2b3b09d725c7..8f8c9e23e13e 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -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 |