diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-04 07:20:31 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-04 07:20:31 +0000 |
commit | 272e00a679c20ad0412329f122a72b8fbe7843f2 (patch) | |
tree | 8ad2ceffcc11fe4df3f6816888c053651f184ac7 /package/network/config | |
parent | 63b35378174dd36ad4d9b79c31e9b15abe498b88 (diff) | |
download | master-187ad058-272e00a679c20ad0412329f122a72b8fbe7843f2.tar.gz master-187ad058-272e00a679c20ad0412329f122a72b8fbe7843f2.tar.bz2 master-187ad058-272e00a679c20ad0412329f122a72b8fbe7843f2.zip |
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 <gamerh2o@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41000 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config')
-rw-r--r-- | package/network/config/swconfig/files/switch.sh | 1 |
1 files changed, 1 insertions, 0 deletions
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 |