2009-04-21 18:48:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright (C) 2009 OpenWrt.org
|
|
|
|
|
|
|
|
setup_switch_dev() {
|
2014-06-04 07:20:31 +00:00
|
|
|
local name
|
2010-01-18 00:38:04 +00:00
|
|
|
config_get name "$1" name
|
|
|
|
name="${name:-$1}"
|
2015-09-08 17:44:24 +00:00
|
|
|
[ -d "/sys/class/net/$name" ] && ip link set dev "$name" up
|
2010-01-18 00:38:04 +00:00
|
|
|
swconfig dev "$name" load network
|
2009-04-21 18:48:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
setup_switch() {
|
|
|
|
config_load network
|
|
|
|
config_foreach setup_switch_dev switch
|
|
|
|
}
|