You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
787 B
53 lines
787 B
18 years ago
|
#!/bin/sh /etc/rc.common
|
||
14 years ago
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||
18 years ago
|
|
||
18 years ago
|
START=40
|
||
15 years ago
|
STOP=90
|
||
18 years ago
|
|
||
18 years ago
|
boot() {
|
||
18 years ago
|
setup_switch() { return 0; }
|
||
|
|
||
|
include /lib/network
|
||
|
setup_switch
|
||
14 years ago
|
|
||
|
/sbin/wifi detect > /tmp/wireless.tmp
|
||
|
[ -s /tmp/wireless.tmp ] && {
|
||
|
cat /tmp/wireless.tmp >> /etc/config/wireless
|
||
|
}
|
||
|
rm -f /tmp/wireless.tmp
|
||
15 years ago
|
grep -qs config /etc/config/wireless && {
|
||
|
/sbin/wifi up
|
||
|
}
|
||
15 years ago
|
|
||
|
scan_interfaces
|
||
|
|
||
|
local ifc
|
||
|
for ifc in $interfaces; do
|
||
|
local proto
|
||
|
config_get proto "$ifc" proto
|
||
|
|
||
15 years ago
|
local auto
|
||
|
config_get_bool auto "$ifc" auto 1
|
||
|
|
||
|
type "coldplug_interface_$proto" >/dev/null && [ "$auto" = 1 ] && \
|
||
15 years ago
|
coldplug_interface_$proto "$ifc"
|
||
|
done
|
||
18 years ago
|
}
|
||
18 years ago
|
|
||
18 years ago
|
start() {
|
||
17 years ago
|
setup_switch() { return 0; }
|
||
|
|
||
17 years ago
|
include /lib/network
|
||
17 years ago
|
setup_switch
|
||
18 years ago
|
ifup -a
|
||
|
/sbin/wifi up
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ifdown -a
|
||
|
}
|
||
15 years ago
|
|
||
|
restart() {
|
||
|
start
|
||
|
}
|