base-files: reload switch settings on /etc/init.d/network start as well
[openwrt/svn-archive/archive.git] / package / base-files / files / etc / init.d / network
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3
4 START=40
5 STOP=90
6
7 boot() {
8 setup_switch() { return 0; }
9
10 include /lib/network
11 setup_switch
12 [ -s /etc/config/wireless ] || \
13 /sbin/wifi detect > /etc/config/wireless
14 /sbin/wifi up
15 }
16
17 start() {
18 setup_switch() { return 0; }
19
20 include /lib/network
21 setup_switch
22 ifup -a
23 /sbin/wifi up
24 }
25
26 stop() {
27 ifdown -a
28 }
29
30 restart() {
31 start
32 }