From e5c78c08f3eef98b19859d9ce5d4d408775beb05 Mon Sep 17 00:00:00 2001 From: blogic Date: Wed, 4 Jun 2014 07:20:31 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41000 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/network/config/swconfig/files/switch.sh | 1 + 1 file changed, 1 insertion(+) 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 -- 2.35.1