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