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 <[email protected]>
---
 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 18d5fbd..ba6924d 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
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to