Przeglądaj źródła

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
Felix Fietkau 14 lat temu
rodzic
commit
803c7edcb3
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      package/netifd/files/etc/init.d/netifd

+ 5 - 0
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() {