mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 06:48:00 +01:00
#2859 set swap maxsize to 4096
This commit is contained in:
parent
1e158e76e4
commit
9e650e18b8
1 changed files with 3 additions and 3 deletions
|
@ -1494,16 +1494,16 @@ if [ "$1" = "swap" ]; then
|
|||
>&2 echo "# Rewrite external SWAP config for BTRFS setup"
|
||||
sudo sed -i "s/^#CONF_SWAPFILE=/CONF_SWAPFILE=/g" /etc/dphys-swapfile
|
||||
sudo sed -i "s/^CONF_SWAPFILE=.*/CONF_SWAPFILE=\/mnt\/temp\/swapfile/g" /etc/dphys-swapfile
|
||||
sudo sed -i "s/^CONF_SWAPSIZE=/#CONF_SWAPSIZE=/g" /etc/dphys-swapfile
|
||||
|
||||
else
|
||||
|
||||
>&2 echo "# Rewrite external SWAP config for EXT4 setup"
|
||||
sudo sed -i "s/^#CONF_SWAPFILE=/CONF_SWAPFILE=/g" /etc/dphys-swapfile
|
||||
sudo sed -i "s/^CONF_SWAPFILE=.*/CONF_SWAPFILE=\/mnt\/hdd\/swapfile/g" /etc/dphys-swapfile
|
||||
sudo sed -i "s/^CONF_SWAPSIZE=/#CONF_SWAPSIZE=/g" /etc/dphys-swapfile
|
||||
|
||||
fi
|
||||
sudo sed -i "s/^CONF_SWAPSIZE=/#CONF_SWAPSIZE=/g" /etc/dphys-swapfile
|
||||
sudo sed -i "s/^#CONF_MAXSWAP=.*/CONF_MAXSWAP=4096/g" /etc/dphys-swapfile
|
||||
|
||||
>&2 echo "# Creating SWAP file .."
|
||||
sudo dd if=/dev/zero of=$externalSwapPath count=4096 bs=1MiB 1>/dev/null
|
||||
|
|
Loading…
Add table
Reference in a new issue