ea93819136f9c2ec3458a9b3fe62baec13dd2822
[openwrt/svn-archive/archive.git] / package / netifd / files / etc / init.d / network
1 #!/bin/sh /etc/rc.common
2
3 START=20
4 STOP=90
5
6 SERVICE_DAEMONIZE=1
7 SERVICE_WRITE_PID=1
8
9 start() {
10 stop
11 [ -e /proc/sys/kernel/core_pattern ] && {
12 ulimit -c unlimited
13 echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
14 }
15 service_start /sbin/netifd
16
17 setup_switch() { return 0; }
18
19 include /lib/network
20 setup_switch
21
22 sleep 1
23
24 /sbin/wifi up
25 }
26
27 restart() {
28 ifdown -a
29 sleep 1
30 start
31 }
32
33 shutdown() {
34 ifdown -a
35 stop
36 }
37
38 stop() {
39 service_stop /sbin/netifd
40 }
41
42 reload() {
43 ubus call network reload
44 /sbin/wifi up
45 }