diff options
author | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-01-23 11:33:41 +0000 |
---|---|---|
committer | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-01-23 11:33:41 +0000 |
commit | c1010873adcddc1458bfb93d6066d69f92dc09da (patch) | |
tree | 83d4ac603d0b39f2a0bd5e91750cd59d8c374347 /package/base-files/files | |
parent | a87ed2b0f3efe7104d08db69c58ae464121b0e86 (diff) |
[package] base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39372 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rw-r--r-- | package/base-files/files/lib/functions/uci-defaults.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index bf6fe1e305..da2093bbb7 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -234,3 +234,13 @@ set network.@switch_vlan[-1].ports='$ports' EOF } +ucidef_add_switch_port() { + local device=$1 + local port=$2 + uci batch <<EOF +add network switch_port +set network.@switch_port[-1].device='$device' +set network.@switch_port[-1].port='$port' +EOF +} + |