2006-10-04 20:05:48 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2006-08-01 23:19:54 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2006-07-30 03:09:09 +00:00
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
START=40
|
2007-05-10 10:07:38 +00:00
|
|
|
STOP=40
|
|
|
|
|
2009-09-06 17:02:14 +00:00
|
|
|
config_cb() {
|
|
|
|
local cfg_type="$1"
|
|
|
|
|
|
|
|
case "$cfg_type" in
|
|
|
|
interface)
|
|
|
|
append networks "$2" "$N"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2007-03-02 13:21:33 +00:00
|
|
|
boot() {
|
2009-09-06 17:02:14 +00:00
|
|
|
uci_load network
|
2006-10-04 20:05:48 +00:00
|
|
|
setup_switch() { return 0; }
|
|
|
|
|
|
|
|
include /lib/network
|
|
|
|
setup_switch
|
2007-07-24 22:10:10 +00:00
|
|
|
[ -s /etc/config/wireless ] || \
|
2006-10-15 15:27:34 +00:00
|
|
|
/sbin/wifi detect > /etc/config/wireless
|
|
|
|
/sbin/wifi up
|
2009-09-06 17:02:14 +00:00
|
|
|
for network in $networks; do
|
|
|
|
config_get startupcheck $network started
|
|
|
|
[ "$startupcheck" = "" ] && ifup $network
|
|
|
|
done
|
2006-10-04 20:05:48 +00:00
|
|
|
}
|
2006-07-30 03:09:09 +00:00
|
|
|
|
2007-03-02 13:21:33 +00:00
|
|
|
start() {
|
|
|
|
ifup -a
|
|
|
|
/sbin/wifi up
|
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
2008-04-15 16:29:49 +00:00
|
|
|
setup_switch() { return 0; }
|
|
|
|
|
2008-04-12 14:57:47 +00:00
|
|
|
include /lib/network
|
2008-03-04 15:50:41 +00:00
|
|
|
setup_switch
|
2007-03-02 13:21:33 +00:00
|
|
|
ifup -a
|
|
|
|
/sbin/wifi up
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ifdown -a
|
|
|
|
}
|