summaryrefslogtreecommitdiff
path: root/package/network/config
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-06-04 07:20:31 +0000
committerJohn Crispin <john@openwrt.org>2014-06-04 07:20:31 +0000
commit5a9c834a12f19426f7aa9b9a91dda4176528fe64 (patch)
treef834692d0d158085706d469038b938979d859ab5 /package/network/config
parentf09ac641d6c7f4eb0a667dc72119b5206377870c (diff)
downloadmtk-20170518-5a9c834a12f19426f7aa9b9a91dda4176528fe64.zip
mtk-20170518-5a9c834a12f19426f7aa9b9a91dda4176528fe64.tar.gz
mtk-20170518-5a9c834a12f19426f7aa9b9a91dda4176528fe64.tar.bz2
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> SVN-Revision: 41000
Diffstat (limited to 'package/network/config')
-rw-r--r--package/network/config/swconfig/files/switch.sh1
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 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