2011-10-21 04:47:49 +03:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-05-24 00:49:28 +03:00
|
|
|
|
|
|
|
START=20
|
2011-10-21 04:47:49 +03:00
|
|
|
STOP=90
|
|
|
|
|
2012-05-24 00:49:28 +03:00
|
|
|
SERVICE_DAEMONIZE=1
|
|
|
|
SERVICE_WRITE_PID=1
|
|
|
|
|
2011-10-21 04:47:49 +03:00
|
|
|
start() {
|
2012-05-24 00:49:28 +03: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 04:47:49 +03:00
|
|
|
setup_switch() { return 0; }
|
|
|
|
|
|
|
|
include /lib/network
|
|
|
|
setup_switch
|
|
|
|
|
2012-05-24 00:49:28 +03:00
|
|
|
sleep 1
|
2012-05-24 19:24:55 +03:00
|
|
|
|
2012-08-10 01:44:52 +03:00
|
|
|
/sbin/wifi down
|
2012-05-24 19:24:55 +03:00
|
|
|
/sbin/wifi up
|
2011-10-21 04:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
2012-05-24 00:49:28 +03:00
|
|
|
ifdown -a
|
|
|
|
sleep 1
|
2011-10-21 04:47:49 +03:00
|
|
|
start
|
2012-05-24 00:49:28 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
shutdown() {
|
|
|
|
ifdown -a
|
|
|
|
stop
|
2011-10-21 04:47:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2012-05-24 00:49:28 +03:00
|
|
|
service_stop /sbin/netifd
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
|
|
|
ubus call network reload
|
2012-08-10 01:44:52 +03:00
|
|
|
/sbin/wifi down
|
2012-05-28 17:22:42 +03:00
|
|
|
/sbin/wifi up
|
2011-10-21 04:47:49 +03:00
|
|
|
}
|