mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
better calclulation
This commit is contained in:
parent
18e16d8dbc
commit
27f72c5b5d
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ _kexec() {
|
||||||
# wait until enough memory is available!
|
# wait until enough memory is available!
|
||||||
while true; do
|
while true; do
|
||||||
if [[ "$(($(stat -c %s /ramfs/initrd.img)*339/100000))" -lt "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]]; then
|
if [[ "$(($(stat -c %s /ramfs/initrd.img)*339/100000))" -lt "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]]; then
|
||||||
[[ "$(($(stat -c %s /ramfs/initrd.img)*339/100000))" -lt "$(grep -w MemAvailable /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]] && break
|
[[ "$(($(stat -c %s /ramfs/initrd.img)*200/100000))" -lt "$(grep -w MemAvailable /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]] && break
|
||||||
else
|
else
|
||||||
[[ "$(($(stat -c %s /ramfs/initrd.img)/1000))" -lt "$(grep -w MemAvailable /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]] && break
|
[[ "$(($(stat -c %s /ramfs/initrd.img)/1000))" -lt "$(grep -w MemAvailable /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]] && break
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue