Ignore:
Timestamp:
2012-04-21T22:34:48+02:00 (5 years ago)
Author:
nbd
Message:

netifd: improve error handling in legacy script compatibility library, do not fill the log with error messages for interfaces that could not be found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/netifd/files/lib/network/config.sh

    r31430 r31432  
    2828ubus_call() { 
    2929        json_init 
    30         local _data="$(ubus call "$1" "$2")" 
    31         [ $? -ne 0 ] && return "$?" 
     30        local _data="$(ubus -S call "$1" "$2")" 
     31        [ -z "$_data" ] && return 1 
    3232        json_load "$_data" 
    3333        return 0 
     
    4444        [ "bridge" = "$type" ] && ifname="br-$config" 
    4545        config_set "$config" device "$ifname" 
    46         ubus_call "network.interface.$config" status 
     46        ubus_call "network.interface.$config" status || return 0 
    4747        json_get_var l3dev l3_device 
    4848        [ -n "$l3dev" ] && ifname="$l3dev" 
Note: See TracChangeset for help on using the changeset viewer.