Author: florian
Date: 2014-09-25 21:08:56 +0200 (Thu, 25 Sep 2014)
New Revision: 42665

Modified:
   trunk/package/base-files/files/lib/functions/uci-defaults.sh
Log:
base-files: add a protocol argument to ucidef_set_interface_raw

Add a third argument to ucidef_set_interface_raw, which is specifying
the protocol.

Signed-off-by: Florian Fainelli <[email protected]>

Modified: trunk/package/base-files/files/lib/functions/uci-defaults.sh
===================================================================
--- trunk/package/base-files/files/lib/functions/uci-defaults.sh        
2014-09-25 11:54:08 UTC (rev 42664)
+++ trunk/package/base-files/files/lib/functions/uci-defaults.sh        
2014-09-25 19:08:56 UTC (rev 42665)
@@ -158,11 +158,12 @@
 ucidef_set_interface_raw() {
        local cfg=$1
        local ifname=$2
+       local proto=${3:-"none"}
 
        uci batch <<EOF
 set network.$cfg='interface'
 set network.$cfg.ifname='$ifname'
-set network.$cfg.proto='none'
+set network.$cfg.proto='$proto'
 EOF
 }
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to