package/netifd: use new service wrapper

SVN-Revision: 28839
This commit is contained in:
Nicolas Thill 2011-11-07 22:58:56 +00:00
parent be27ac53f2
commit 7a176742bb

View file

@ -1,6 +1,9 @@
#!/bin/sh /etc/rc.common
START=20
PIDFILE=/var/run/netifd.pid
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
start() {
stop
@ -8,16 +11,14 @@ start() {
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
service_start /sbin/netifd
sleep 1
}
stop() {
service_stop /sbin/netifd
}
reload() {
ubus call network reload
}
stop() {
[ -e "$PIDFILE" ] || return
start-stop-daemon -K -p $PIDFILE -x /sbin/netifd
rm -f "$PIDFILE"
}