OSDN Git Service

fix swap
authorpaperbenni <paperbenni@gmail.com>
Thu, 3 Sep 2020 14:02:55 +0000 (16:02 +0200)
committerpaperbenni <paperbenni@gmail.com>
Thu, 3 Sep 2020 14:02:55 +0000 (16:02 +0200)
chroot/chroot.sh

index 5751829..35fb131 100755 (executable)
@@ -25,7 +25,10 @@ if ! [ -e /opt/topinstall ] && ! iroot partswap; then
         if ! grep -iq manjaro /etc/os-release; then
             # enable swap
             systemctl enable systemd-swap
-            sed -i 's/^swapfc_enabled=.*/swapfc_enabled=1/' /etc/systemd/swap.conf
+            {
+                echo "swapfc_enabled=1"
+                echo "swapfc_max_count=8"
+            } >> /etc/systemd/swap.conf
         fi
     fi
 fi