2011-10-21 01:47:49 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-05-23 21:49:28 +00:00
|
|
|
|
|
|
|
START=20
|
2011-10-21 01:47:49 +00:00
|
|
|
STOP=90
|
|
|
|
|
2012-05-23 21:49:28 +00:00
|
|
|
SERVICE_DAEMONIZE=1
|
|
|
|
SERVICE_WRITE_PID=1
|
|
|
|
|
2011-10-21 01:47:49 +00:00
|
|
|
start() {
|
2012-05-23 21:49:28 +00:00
|
|
|
stop
|
|
|
|
[ -e /proc/sys/kernel/core_pattern ] && {
|
|
|
|
ulimit -c unlimited
|
|
|
|
echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
|
|
|
|
}
|
|
|
|
service_start /sbin/netifd
|
|
|
|
|
2011-10-21 01:47:49 +00:00
|
|
|
setup_switch() { return 0; }
|
|
|
|
|
|
|
|
include /lib/network
|
|
|
|
setup_switch
|
|
|
|
|
2012-05-23 21:49:28 +00:00
|
|
|
sleep 1
|
2011-10-21 01:47:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
2012-05-23 21:49:28 +00:00
|
|
|
ifdown -a
|
|
|
|
sleep 1
|
2011-10-21 01:47:49 +00:00
|
|
|
start
|
2012-05-23 21:49:28 +00:00
|
|
|
wifi
|
|
|
|
}
|
|
|
|
|
|
|
|
shutdown() {
|
|
|
|
ifdown -a
|
|
|
|
stop
|
2011-10-21 01:47:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2012-05-23 21:49:28 +00:00
|
|
|
service_stop /sbin/netifd
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
|
|
|
ubus call network reload
|
2011-10-21 01:47:49 +00:00
|
|
|
}
|