minor cleanup
authorFelix Fietkau <nbd@openwrt.org>
Fri, 6 Oct 2006 20:24:05 +0000 (20:24 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 6 Oct 2006 20:24:05 +0000 (20:24 +0000)
SVN-Revision: 4939

openwrt/package/base-files/default/lib/network/config.sh

index bb58a3e751dd66f929eeb7515c9e5f88c5991027..3e18db1b43b608b138abee3e0e8915977d880dd1 100755 (executable)
@@ -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