2 # Copyright (C) 2011 OpenWrt.org
4 .
/usr
/share
/libubox
/jshn.sh
16 local _data
="$(ubus call "$1" "$2")"
17 [ $?
-ne 0 ] && return "$?"
27 config_get
type "$config" type
28 config_get ifname
"$config" ifname
29 [ "bridge" = "$type" ] && ifname
="br-$config"
30 config_set
"$config" device
"$ifname"
31 ubus_call
"network.interface.$config" status
32 json_get_var l3dev l3_device
33 [ -n "$l3dev" ] && ifname
="$l3dev"
35 config_set
"$config" ifname
"$ifname"
40 config_foreach fixup_interface interface
43 prepare_interface_bridge
() {
46 [ -n "$config" ] ||
return 0
47 ubus call network.interface.
"$config" prepare
54 [ -n "$config" ] ||
return 0
55 ubus call network.interface.
"$config" add_device
"{ \"name\": \"$iface\" }"