diff mbox

[OpenWrt-Devel,PATCHv2] base-files: add function ucidef_set_interface_raw

Message ID 60cb6184897c7e7e38f98a149f7b28c4@telldus.se
State Changes Requested
Headers show

Commit Message

micke.prag@telldus.se March 1, 2016, 1:15 p.m. UTC
This function can be used to configure default configuration on 
interfaces other
than lan and wan, such as wlan or other custom interfaces.

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

$cpu5

Comments

John Crispin March 3, 2016, 8:21 p.m. UTC | #1
Hi,

maybe i am doing some thing wrong but this still does not apply for me.
did you generate this of current trunk HEAD ?

	John

On 01/03/2016 14:15, micke.prag@telldus.se wrote:
> This function can be used to configure default configuration on
> interfaces other
> than lan and wan, such as wlan or other custom interfaces.
> 
> Signed-off-by: Micke Prag <micke.prag@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 512e0ed..d36ead2 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
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Felix Fietkau March 5, 2016, 10:33 a.m. UTC | #2
On 2016-03-01 14:15, micke.prag@telldus.se wrote:
> This function can be used to configure default configuration on 
> interfaces other
> than lan and wan, such as wlan or other custom interfaces.
> 
> Signed-off-by: Micke Prag <micke.prag@telldus.se>
Patch is line wrapped and does not apply.

- Felix
diff mbox

Patch

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index 512e0ed..d36ead2 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