Make swapfile optional

This commit is contained in:
seajee
2024-09-02 05:27:30 +02:00
parent eb257125f4
commit a43df7e768

View File

@@ -96,9 +96,14 @@ mount "${disk}2" /mnt
mount --mkdir "${disk}1" /mnt/boot mount --mkdir "${disk}1" /mnt/boot
# Swap file # Swap file
echo "[INFO] Swapfile configuration"
read -p "Enable swap? [Y/n] " input
if [[ "$input" != [Nn]* ]]; then
echo "[INFO] Creating the swap file" echo "[INFO] Creating the swap file"
mkswap -U clear --size 4G --file /mnt/swapfile &>/dev/null mkswap -U clear --size 4G --file /mnt/swapfile &>/dev/null
swapon /mnt/swapfile swapon /mnt/swapfile
fi
# TODO: Select the mirrors for faster download speeds # TODO: Select the mirrors for faster download speeds