aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-09-25 19:08:56 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-09-25 19:08:56 +0000
commitbc96c49c67076fd3516ee5225e4ca863c9111bdd (patch)
tree681f78c3ac7cb6c6a5e9b155132e4549e814a77e /package/base-files/files/lib
parent71960baa7d1c2f1779b6b83663ca39818bbc81cb (diff)
downloadupstream-bc96c49c67076fd3516ee5225e4ca863c9111bdd.tar.gz
upstream-bc96c49c67076fd3516ee5225e4ca863c9111bdd.tar.bz2
upstream-bc96c49c67076fd3516ee5225e4ca863c9111bdd.zip
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 <florian@openwrt.org> SVN-Revision: 42665
Diffstat (limited to 'package/base-files/files/lib')
-rw-r--r--package/base-files/files/lib/functions/uci-defaults.sh3
1 files changed, 2 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 f144adefb4..e90090c40b 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/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
}