mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
nex try arithmethics
This commit is contained in:
parent
f6ea7a9862
commit
d424446645
1 changed files with 2 additions and 2 deletions
|
@ -273,8 +273,8 @@ _create_initramfs() {
|
|||
}
|
||||
|
||||
_kexec() {
|
||||
# you need approx. 3x size for KEXEC_FILE_LOAD
|
||||
if [[ "$(($(stat -c %s /initrd.img)*305/100000))" -lt "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]]; then
|
||||
# you need approx. 4.25x size for KEXEC_FILE_LOAD
|
||||
if [[ "$(($(stat -c %s /initrd.img)*425/100000))" -lt "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" ]]; then
|
||||
echo -e "Running \033[1m\033[92mkexec\033[0m with \033[1mnew\033[0m KEXEC_FILE_LOAD ..."
|
||||
kexec -s -f /"${VMLINUZ}" --initrd="/initrd.img" --reuse-cmdline &
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue