summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAndrew Dunham <andrew@du.nham.ca>2018-10-16 02:45:25 -0700
committerAndrew Dunham <andrew@du.nham.ca>2018-10-16 02:45:25 -0700
commitc3e004799c8fbc9c26d4178004accf991714cff7 (patch)
tree9d2d36a00b28ce4c538b4f161f9f34b5e60f9bae /nixos
parent45a419ab5a23c93421c18f3d9cde015ded22e712 (diff)
downloadnixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar.gz
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar.bz2
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar.lz
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar.xz
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.tar.zst
nixpkgs-c3e004799c8fbc9c26d4178004accf991714cff7.zip
Hide useless errors when waiting for zpool to be ready
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/tasks/filesystems/zfs.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index 2b3b09d725c..8f8c9e23e13 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