don't attempt to export zpool if there is none

This commit is contained in:
fin444 2024-06-29 17:19:50 -04:00 committed by mergify[bot]
parent ce18c086d8
commit c20787adb1

View File

@ -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