base-files: set kernel.core_pattern in sysctl.conf
authorFelix Fietkau <nbd@openwrt.org>
Fri, 11 Sep 2015 16:35:17 +0000 (16:35 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 11 Sep 2015 16:35:17 +0000 (16:35 +0000)
Move the pattern setting from netifd's service script to
/etc/sysctl.conf.  Put the timestamp component '%t' just after
executable name '%e' for more natural order from output of ls command.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
SVN-Revision: 46867

package/base-files/files/etc/sysctl.conf
package/network/config/netifd/files/etc/init.d/network

index 8f3de1aac0d917579cea30e9706292cb5d821707..2ea1f1a8e3a1632feb28d1608eb0c98f9d654b05 100644 (file)
@@ -1,4 +1,6 @@
 kernel.panic=3
+kernel.core.pattern=/tmp/%e.%t.%p.%s.core
+
 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
index 542fc08958e001c2bfce7668ecd7d1c52a649e4e..bdadbbce6db6f9383a0e2c7fab25e7f5d8823091 100755 (executable)
@@ -21,7 +21,6 @@ start_service() {
        procd_set_param watch network.interface
        [ -e /proc/sys/kernel/core_pattern ] && {
                procd_set_param limits core="unlimited"
-               echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
        }
        procd_close_instance
 }