Set vm.swappiness=0 if the user opts out of swap

This commit is contained in:
2022-07-29 16:46:57 -04:00
parent 1782cb2947
commit d0bc786421
+2
View File
@@ -155,6 +155,8 @@ if [ "$swap" != 0 ]; then
mkswap /mnt/swapfile
swapon /mnt/swapfile
echo 'vm.swappiness=10' > /mnt/etc/sysctl.d/99-swappiness.conf
else
echo 'vm.swappiness=0' > /mnt/etc/sysctl.d/99-swappiness.conf
fi
fstabgen -U /mnt >> /mnt/etc/fstab