netdev)
local device mode
- json_get_vars device mode
+ json_get_vars mode
+ json_get_values device device
uci -q batch <<-EOF
set system.$cfg.trigger='netdev'
set system.$cfg.mode='$mode'
- set system.$cfg.dev='$device'
EOF
+ for dev in $device; do
+ uci add_list system.$cfg.dev=$dev
+ done
;;
usb)
}
ucidef_set_led_netdev() {
- local dev="$4"
+ local devices="$4"
local mode="${5:-link tx rx}"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type netdev
- json_add_string device "$dev"
+ json_select_array device
+ for netdev in $devices; do
+ json_add_string "device" "$netdev"
+ done
+ json_select ..
json_add_string mode "$mode"
json_select ..