diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index 4bbc2d80..4751c2dc 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -625,9 +625,8 @@ if [[ ${phases[reboot]} == 1 ]]; 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/ - if [[ ${swapoff} == "y" ]]; then - swapoff -a - fi + # in case our zpool has a swap device + swapoff -a zpool export -a || true fi nohup sh -c 'sleep 6 && reboot' >/dev/null &