mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-12 00:44:03 +02:00
fix nonhotpluggable networks not being brought up. Closes #2781
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17527 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d303e45f4b
commit
943fc97fb0
@ -4,7 +4,18 @@
|
|||||||
START=40
|
START=40
|
||||||
STOP=40
|
STOP=40
|
||||||
|
|
||||||
|
config_cb() {
|
||||||
|
local cfg_type="$1"
|
||||||
|
|
||||||
|
case "$cfg_type" in
|
||||||
|
interface)
|
||||||
|
append networks "$2" "$N"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
|
uci_load network
|
||||||
setup_switch() { return 0; }
|
setup_switch() { return 0; }
|
||||||
|
|
||||||
include /lib/network
|
include /lib/network
|
||||||
@ -12,6 +23,10 @@ boot() {
|
|||||||
[ -s /etc/config/wireless ] || \
|
[ -s /etc/config/wireless ] || \
|
||||||
/sbin/wifi detect > /etc/config/wireless
|
/sbin/wifi detect > /etc/config/wireless
|
||||||
/sbin/wifi up
|
/sbin/wifi up
|
||||||
|
for network in $networks; do
|
||||||
|
config_get startupcheck $network started
|
||||||
|
[ "$startupcheck" = "" ] && ifup $network
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
@ -153,6 +153,7 @@ set_interface_ifname() {
|
|||||||
config_get device "$1" device
|
config_get device "$1" device
|
||||||
uci_set_state network "$config" ifname "$ifname"
|
uci_set_state network "$config" ifname "$ifname"
|
||||||
uci_set_state network "$config" device "$device"
|
uci_set_state network "$config" device "$device"
|
||||||
|
uci_set_state network "$config" started 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_interface_none() {
|
setup_interface_none() {
|
||||||
|
@ -203,6 +203,7 @@ for ifc in $interfaces __default; do
|
|||||||
config_get ifname "$ifc" ifname
|
config_get ifname "$ifc" ifname
|
||||||
config_get aliases "$ifc" aliases
|
config_get aliases "$ifc" aliases
|
||||||
uci_revert_state network "$ifc"
|
uci_revert_state network "$ifc"
|
||||||
|
uci_set_state network "$ifc" started 1
|
||||||
[ -n "$device" ] && uci_set_state network "$ifc" device "$device"
|
[ -n "$device" ] && uci_set_state network "$ifc" device "$device"
|
||||||
[ -n "$ifname" ] && uci_set_state network "$ifc" ifname "$ifname"
|
[ -n "$ifname" ] && uci_set_state network "$ifc" ifname "$ifname"
|
||||||
[ -n "$aliases" ] && uci_set_state network "$ifc" aliases "$aliases"
|
[ -n "$aliases" ] && uci_set_state network "$ifc" aliases "$aliases"
|
||||||
|
Loading…
Reference in New Issue
Block a user