mirror of https://github.com/hak5/openwrt.git
base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39372lede-17.01
parent
3787078b26
commit
d66d2ad104
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
include $(INCLUDE_DIR)/version.mk
|
include $(INCLUDE_DIR)/version.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=150
|
PKG_RELEASE:=151
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
|
@ -234,3 +234,13 @@ set network.@switch_vlan[-1].ports='$ports'
|
||||||
EOF
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue