From d30c4f89338615d6b5860d0652406273a0b7cc84 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 Oct 2011 18:30:55 +0000 Subject: [PATCH] netifd: if core dump support is enabled, use it. also add some delay after start to avoid race conditions with other init scripts SVN-Revision: 28611 --- package/netifd/files/etc/init.d/netifd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/netifd/files/etc/init.d/netifd b/package/netifd/files/etc/init.d/netifd index e1047e7a81..23b7186333 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() { -- 2.30.2