From 9ac6b3d842c469fb897fb4c51cebfc90516b8354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 1 Feb 2025 09:54:43 +0100 Subject: [PATCH] Update src/nixos-anywhere.sh --- src/nixos-anywhere.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 &