Update file run_onchange_before_configure-swap.tmpl

This commit is contained in:
Brian Zalewski 2022-12-25 08:41:35 +00:00
parent 990c3edc32
commit a4fb1014e3

View file

@ -4,6 +4,7 @@
{{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
if [ ! -f /swapfile ]; then
MEMORY_IN_KB="$(grep MemTotal /proc/meminfo | sed 's/.* \(.*\) kB/\1/')" MEMORY_IN_KB="$(grep MemTotal /proc/meminfo | sed 's/.* \(.*\) kB/\1/')"
MEMORY_IN_GB="$((MEMORY_IN_KB / 1024 / 1024))" MEMORY_IN_GB="$((MEMORY_IN_KB / 1024 / 1024))"
@ -27,3 +28,4 @@ if cat /etc/fstab | grep "/swapfile"; then
else else
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
fi fi
fi