mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add wait loop for kexec
This commit is contained in:
parent
71deb90899
commit
4374b96e1d
1 changed files with 4 additions and 2 deletions
|
@ -229,8 +229,10 @@ _kill_w_dir() {
|
|||
else
|
||||
if [[ -d "${_W_DIR}" ]]; then
|
||||
rm -r "${_W_DIR}"
|
||||
# wait 20 seconds to get RAM cleared and set free
|
||||
sleep 20
|
||||
while true; do
|
||||
[[ "$(($(stat -c %s /initrd.img)*339/100000))" -lt "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]] && break
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue