X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ef0a8980a26b3eb90b98645083dfc7c65b7e881f..8600b97ee65ecd97461508bf0e67de06707a2e59:/package/swconfig/files/switch.sh diff --git a/package/swconfig/files/switch.sh b/package/swconfig/files/switch.sh index d752b1383..18d5fbd2c 100644 --- a/package/swconfig/files/switch.sh +++ b/package/swconfig/files/switch.sh @@ -2,7 +2,10 @@ # Copyright (C) 2009 OpenWrt.org setup_switch_dev() { - swconfig dev "$1" load network + config_get name "$1" name + name="${name:-$1}" + [ -d "/sys/class/net/$name" ] && ifconfig "$name" up + swconfig dev "$name" load network } setup_switch() {