Root/package/network/config/netifd/files/etc/init.d/network

1#!/bin/sh /etc/rc.common
2
3START=20
4STOP=90
5
6SERVICE_DAEMONIZE=1
7SERVICE_WRITE_PID=1
8
9start() {
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 down
25    /sbin/wifi up
26}
27
28restart() {
29    ifdown -a
30    sleep 1
31    start
32}
33
34shutdown() {
35    ifdown -a
36    stop
37}
38
39stop() {
40    service_stop /sbin/netifd
41}
42
43reload() {
44    ubus call network reload
45    /sbin/wifi down
46    /sbin/wifi up
47}
48

Archive Download this file



interactive