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
This commit is contained in:
parent
f09ac641d6
commit
5a9c834a12
1 changed files with 1 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009 OpenWrt.org
|
||||||
|
|
||||||
setup_switch_dev() {
|
setup_switch_dev() {
|
||||||
|
local name
|
||||||
config_get name "$1" name
|
config_get name "$1" name
|
||||||
name="${name:-$1}"
|
name="${name:-$1}"
|
||||||
[ -d "/sys/class/net/$name" ] && ifconfig "$name" up
|
[ -d "/sys/class/net/$name" ] && ifconfig "$name" up
|
||||||
|
|
Loading…
Reference in a new issue