package: swconfig: let variable name be local
authorJohn Crispin <john@openwrt.org>
Wed, 4 Jun 2014 07:20:31 +0000 (07:20 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 4 Jun 2014 07:20:31 +0000 (07:20 +0000)
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 <gamerh2o@gmail.com>
SVN-Revision: 41000

package/network/config/swconfig/files/switch.sh

index 18d5fbd2c3d58f356e6f9ceec86ebc2caf38b757..ba6924d9d21d16f134c078187e554de860b5f6cc 100644 (file)
@@ -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