netifd: do not validate relevant section when ipv6 is not supported
[openwrt/.git] / package / network / config / netifd / files / sbin / ifup
index e6dbb3541778626e170044338093a64a9e4e0186..5515b91f76df2b5c36d46ac4b86dfc9bdcd78b1d 100755 (executable)
@@ -6,7 +6,7 @@ setup_wifi=
 if_call() {
        local interface="$1"
        for mode in $modes; do
-               ubus call $interface $mode
+               ubus call network.interface $mode "{ \"interface\" : \"$interface\" }"
        done
 }
 
@@ -38,7 +38,7 @@ done
 [ "$modes" = "down up" ] && ubus call network reload
 if [ -n "$ifup_all" ]; then
        for interface in `ubus -S list 'network.interface.*'`; do
-               if_call "$interface"
+               if_call "${interface##network.interface.}"
        done
        [ -n "$setup_wifi" ] && /sbin/wifi up
        exit
@@ -47,7 +47,7 @@ else
                echo "Interface $1 not found"
                exit
        }
-       if_call "network.interface.$1"
+       if_call "$1"
 fi
 
 if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
@@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
                fi
        }
 
-       local radio_devs
-       local network="$1"
+       network="$1"
        config_load wireless
        config_foreach find_related_radios wifi-iface
 
-       local dev
        for dev in $(echo "$radio_devs" | sort -u); do
                /sbin/wifi up "$dev"
        done