diff options
Diffstat (limited to 'package/base-files/files/lib/functions/uci-defaults.sh')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 39bbeda24c..2f50cd6bfd 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -91,7 +91,23 @@ ucidef_set_interfaces_lan_wan() { } ucidef_set_bridge_device() { - json_add_string bridge "${1:switch0}" + json_select_object bridge + json_add_string name "${1:switch0}" + json_select .. +} + +ucidef_set_bridge_mac() { + json_select_object bridge + json_add_string macaddr "${1}" + json_select .. +} + +ucidef_set_network_device_mac() { + json_select_object "network-device" + json_select_object "${1}" + json_add_string macaddr "${2}" + json_select .. + json_select .. } _ucidef_add_switch_port() { |