From c20787adb18571e961e617f2a2cb7c114b1ea7f1 Mon Sep 17 00:00:00 2001 From: fin444 Date: Sat, 29 Jun 2024 17:19:50 -0400 Subject: [PATCH] don't attempt to export zpool if there is none --- src/nixos-anywhere.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index 9010ae6..ab236ba 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -510,7 +510,7 @@ if [ ${copy_host_keys-n} = "y" ]; then done fi nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system" -if command -v zpool >/dev/null; then +if command -v zpool >/dev/null && [ "\$(zpool list)" != "no pools available" ]; then # we always want to export the zfs pools so people can boot from it without force import umount -Rv /mnt/ zpool export -a || true