X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9a624fb1b71225fcc7b3af900985a65124e290b7..df5bf72a25709238532b53431d551b12769981ef:/package/swconfig/files/switch.sh?ds=inline 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() {