projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ba6924d9d21d16f134c078187e554de860b5f6cc
[openwrt.git]
/
package
/
network
/
config
/
swconfig
/
files
/
switch.sh
1
#!/bin/sh
2
# Copyright (C) 2009 OpenWrt.org
3
4
setup_switch_dev() {
5
local name
6
config_get name "$1" name
7
name="${name:-$1}"
8
[ -d "/sys/class/net/$name" ] && ifconfig "$name" up
9
swconfig dev "$name" load network
10
}
11
12
setup_switch() {
13
config_load network
14
config_foreach setup_switch_dev switch
15
}