about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2024-01-12 20:07:24 +0100
committerGitHub <noreply@github.com>2024-01-12 20:07:24 +0100
commit724d5348a6e84ebca1d841fc5f8be82572f71c42 (patch)
tree4f41595aa064476de995e56f279cd9cd5cd6e694 /nixos
parente947a837d74b3c43ac11daa0bce13173b8e6de1d (diff)
parent88f50101ac4b6e019123b107b3e028ab81df6527 (diff)
Merge pull request #272794 from dcarosone/zpool-import-d
nixos/zfs: check pool state with -d, like import
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 b38f228fc1606..bc8b8fdf8144f 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -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