Refactor calculation of swap size
This commit is contained in:
parent
ac3d551c95
commit
af09e9a7ec
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ ARCH_DISK="${ARCH_DISK}";
|
|||
SKIP_FORMAT_EFI="${SKIP_FORMAT_EFI}";
|
||||
PARTITION_SCRIPT="${PARTITION_SCRIPT:-"./default-partition.sh"}";
|
||||
memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
|
||||
swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')";
|
||||
swapSize="$(echo "$memory" | awk '{ print int((($1 / 1024 / 1024) * 0.75) + 0.5)}')";
|
||||
|
||||
export SWAP_SIZE="$swapSize";
|
||||
|
||||
|
|
Loading…
Reference in a new issue