X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9a624fb1b71225fcc7b3af900985a65124e290b7..772991beff52012cb9a1b3e8a96ec1cf8b0ee60c:/package/swconfig/files/switch.sh diff --git a/package/swconfig/files/switch.sh b/package/swconfig/files/switch.sh index 7078b2e82..18d5fbd2c 100644 --- a/package/swconfig/files/switch.sh +++ b/package/swconfig/files/switch.sh @@ -2,8 +2,10 @@ # Copyright (C) 2009 OpenWrt.org setup_switch_dev() { - ifconfig "$1" 0.0.0.0 - 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() {