summaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/default/lib/network/config.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/package/base-files/default/lib/network/config.sh b/package/base-files/default/lib/network/config.sh
index bb58a3e75..3e18db1b4 100755
--- a/package/base-files/default/lib/network/config.sh
+++ b/package/base-files/default/lib/network/config.sh
@@ -59,17 +59,14 @@ add_vlan() {
setup_interface() {
local iface="$1"
local config="$2"
- local proto="$3"
+ local proto
[ -n "$config" ] || {
config=$(find_config "$iface")
[ "$?" = 0 ] || return 1
}
- [ -n "$proto" ] || {
- config_get proto "$config" proto
- }
-
+ proto="${3:-$(config_get "$config" proto)}"
config_get iftype "$config" type
# Setup VLAN interfaces