Update file run_onchange_before_configure-swap.tmpl
This commit is contained in:
parent
990c3edc32
commit
a4fb1014e3
1 changed files with 22 additions and 20 deletions
|
@ -4,6 +4,7 @@
|
|||
{{ includeTemplate "universal/profile" }}
|
||||
{{ includeTemplate "universal/logg" }}
|
||||
|
||||
if [ ! -f /swapfile ]; then
|
||||
MEMORY_IN_KB="$(grep MemTotal /proc/meminfo | sed 's/.* \(.*\) kB/\1/')"
|
||||
MEMORY_IN_GB="$((MEMORY_IN_KB / 1024 / 1024))"
|
||||
|
||||
|
@ -27,3 +28,4 @@ if cat /etc/fstab | grep "/swapfile"; then
|
|||
else
|
||||
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue