[OpenWrt-Devel] [PATCH 1/2] base-files: add function ucidef_set_interface_raw to enable default configuration on interfaces other than lan and wan.

Micke Prag micke.prag at telldus.se
Tue Mar 8 07:45:53 EST 2016


Signed-off-by: Micke Prag <micke.prag at telldus.se>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 31e4687..b097fba 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -89,6 +89,12 @@ ucidef_set_interfaces_lan_wan() {
 	json_select ..
 }
 
+ucidef_set_interface_raw() {
+	json_select_object network
+	_ucidef_set_interface "$@"
+	json_select ..
+}
+
 _ucidef_add_switch_port() {
 	# inherited: $num $device $need_tag $role $index $prev_role
 	# inherited: $n_cpu $n_ports $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5
-- 
2.4.10
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list