From 6c1a7e846bb335412c25a4ccf5699f31cfb55751 Mon Sep 17 00:00:00 2001 From: oddlama Date: Wed, 5 Oct 2022 15:47:48 +0200 Subject: [PATCH] fix: disable swap after creating to prevent some live environments from using the swap immediately (fixes #57) --- scripts/functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/functions.sh b/scripts/functions.sh index 8c1228a..7aa2960 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -411,6 +411,9 @@ function disk_format() { mkswap "$device" \ || die "Could not format device '$device' ($id)" fi + + # Try to swapoff in case the system enabled swap automatically + swapoff "$device" &>/dev/null ;; 'ext4') if [[ -v "arguments[label]" ]]; then