From: John Crispin Date: Wed, 4 Jun 2014 07:20:31 +0000 (+0000) Subject: package: swconfig: let variable name be local X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=bca0c4943c8b52d52cf9db2ac000f0b2c115d4b5;p=openwrt%2Fsvn-archive%2Farchive.git package: swconfig: let variable name be local Let the first parameter of function config_get be local, because there is a chance that config_get won't export the variable. Signed-off-by: Zhao, Gang SVN-Revision: 41000 --- diff --git a/package/network/config/swconfig/files/switch.sh b/package/network/config/swconfig/files/switch.sh index 18d5fbd2c3..ba6924d9d2 100644 --- a/package/network/config/swconfig/files/switch.sh +++ b/package/network/config/swconfig/files/switch.sh @@ -2,6 +2,7 @@ # Copyright (C) 2009 OpenWrt.org setup_switch_dev() { + local name config_get name "$1" name name="${name:-$1}" [ -d "/sys/class/net/$name" ] && ifconfig "$name" up