gluon-simple-tc: add site validator

This commit is contained in:
Matthias Schiffer 2014-07-16 17:31:40 +02:00
parent bd4e26f12f
commit d42b7247c3
2 changed files with 17 additions and 2 deletions

View File

@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-simple-tc
PKG_VERSION:=2
PKG_VERSION:=3
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
include $(GLUONDIR)/include/package.mk
define Package/gluon-simple-tc
SECTION:=gluon
@ -32,4 +32,9 @@ define Package/gluon-simple-tc/install
$(CP) ./files/* $(1)/
endef
define Package/gluon-simple-tc/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-simple-tc))

View File

@ -0,0 +1,10 @@
local function check_entry(k, _)
local prefix = string.format('simple_tc[%q].', k)
need_string(prefix .. 'ifname')
need_boolean(prefix .. 'enabled')
need_number(prefix .. 'limit_egress')
need_number(prefix .. 'limit_ingress')
end
need_table('simple_tc', check_entry)