base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39372
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user