summaryrefslogtreecommitdiffstats
path: root/package/netifd/files
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-26 18:30:55 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-26 18:30:55 +0000
commit75ca86fa3189814526ba20b88f2530771cf1ce32 (patch)
treed939be17d2d27fd2a438bf06f96f0d0ec1a4e10e /package/netifd/files
parent8552f681e17fae537a94dc897eddd5c0752a0a60 (diff)
netifd: if core dump support is enabled, use it. also add some delay after start to avoid race conditions with other init scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28611 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/netifd/files')
-rwxr-xr-xpackage/netifd/files/etc/init.d/netifd5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/netifd/files/etc/init.d/netifd b/package/netifd/files/etc/init.d/netifd
index e1047e7a8..23b718633 100755
--- a/package/netifd/files/etc/init.d/netifd
+++ b/package/netifd/files/etc/init.d/netifd
@@ -4,7 +4,12 @@ PIDFILE=/var/run/netifd.pid
start() {
stop
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ ulimit -c unlimited
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/netifd
+ sleep 1
}
reload() {