Merge pull request #19 from sargon/master

gluon-core: force kernel panic on out of memory

This also adds /lib/gluon/functions/sysctl.sh for setting sysctl options.
This commit is contained in:
Nils Schneider 2014-02-19 14:39:51 +01:00
commit 14d0d522bc
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,4 @@
sysctl_set() {
sed -i "/^${1//./\.}=/d" /etc/sysctl.conf
echo "${1}=$2" >> /etc/sysctl.conf
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
. /lib/gluon/functions/sysctl.sh
sysctl_set vm.panic_on_oom 1