Browse Source

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]>

SVN-Revision: 42665
Florian Fainelli 11 years ago
parent
commit
bc96c49c67
1 changed files with 2 additions and 1 deletions
  1. 2 1
      package/base-files/files/lib/functions/uci-defaults.sh

+ 2 - 1
package/base-files/files/lib/functions/uci-defaults.sh

@@ -158,11 +158,12 @@ EOF
 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
 }