ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / package / boot / kexec-tools / files / kdump.defaults
1 #!/bin/sh
2
3 # kB disable if mem low than 256MB
4 memtotal=`grep MemTotal /proc/meminfo | awk '{print $2}'`
5 if test $memtotal -le 262144; then
6 exit 0
7 fi
8 KZ=128
9 if test $memtotal -ge 8388608; then
10 KZ=512
11 elif test $memtotal -ge 4194304; then
12 KZ=256
13 fi
14
15 case $(uname -m) in
16 i?86|x86_64)
17 if ! grep -q crashkernel /boot/grub/grub.cfg; then
18 mount /boot -o remount,rw
19 sed -i "s/linux.*/& crashkernel=${KZ}M/" /boot/grub/grub.cfg
20 mount /boot -o remount,ro
21 fi
22 ;;
23 esac