2009-04-22 02:48:48 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright (C) 2009 OpenWrt.org
|
|
|
|
|
|
|
|
setup_switch_dev() {
|
2014-06-04 15:20:31 +08:00
|
|
|
local name
|
2010-01-18 08:38:04 +08:00
|
|
|
config_get name "$1" name
|
|
|
|
name="${name:-$1}"
|
|
|
|
[ -d "/sys/class/net/$name" ] && ifconfig "$name" up
|
|
|
|
swconfig dev "$name" load network
|
2009-04-22 02:48:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
setup_switch() {
|
|
|
|
config_load network
|
|
|
|
config_foreach setup_switch_dev switch
|
|
|
|
}
|