From 2e6a902a76480114dd984448b42bd1a6435e9b6a Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Sat, 17 Mar 2018 12:45:46 +0800 Subject: [PATCH] wifidog-ng: update to 1.2.4 Signed-off-by: Jianhui Zhao --- net/wifidog-ng/Makefile | 4 ++-- net/wifidog-ng/files/wifidog-ng.config | 2 ++ net/wifidog-ng/files/wifidog-ng.crt | 0 net/wifidog-ng/files/wifidog-ng.init | 21 +++++++++++++++++++++ net/wifidog-ng/files/wifidog-ng.key | 0 5 files changed, 25 insertions(+), 2 deletions(-) mode change 100755 => 100644 net/wifidog-ng/Makefile mode change 100755 => 100644 net/wifidog-ng/files/wifidog-ng.config mode change 100755 => 100644 net/wifidog-ng/files/wifidog-ng.crt mode change 100755 => 100644 net/wifidog-ng/files/wifidog-ng.key diff --git a/net/wifidog-ng/Makefile b/net/wifidog-ng/Makefile old mode 100755 new mode 100644 index fc8a8ccfd1..f95d596920 --- a/net/wifidog-ng/Makefile +++ b/net/wifidog-ng/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wifidog-ng -PKG_VERSION:=1.2.0 +PKG_VERSION:=1.2.4 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_SOURCE_URL=https://github.com/zhaojh329/wifidog-ng.git -PKG_MIRROR_HASH:=d8e6749e8f8c788043cd8261b55f41e4dae6a5f7fa88aeca8c9613c88a602006 +PKG_MIRROR_HASH:=e437366d73f3becb61701560d88740fb097b8060b636febe3ad872831c83b598 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) diff --git a/net/wifidog-ng/files/wifidog-ng.config b/net/wifidog-ng/files/wifidog-ng.config old mode 100755 new mode 100644 index c2de03880d..42b95ee856 --- a/net/wifidog-ng/files/wifidog-ng.config +++ b/net/wifidog-ng/files/wifidog-ng.config @@ -20,3 +20,5 @@ config authserver config popularserver list server www.baidu.com list server www.qq.com + +config whitelist diff --git a/net/wifidog-ng/files/wifidog-ng.crt b/net/wifidog-ng/files/wifidog-ng.crt old mode 100755 new mode 100644 diff --git a/net/wifidog-ng/files/wifidog-ng.init b/net/wifidog-ng/files/wifidog-ng.init index 47108f13a3..1a9be3d52a 100755 --- a/net/wifidog-ng/files/wifidog-ng.init +++ b/net/wifidog-ng/files/wifidog-ng.init @@ -5,9 +5,30 @@ START=95 BIN=/usr/bin/wifidog-ng +parse_whitelist() { + local cfg="$1" + local domain mac + + uci_validate_section wifidog-ng whitelist "${1}" \ + 'domain:list(host)' \ + 'mac:list(macaddr)' + + [ $? -ne 0 ] && { + echo "validation failed" >&2 + exit 1 + } + + for m in $mac; do + echo "!$m" > /proc/wifidog-ng/term + done +} + start_service() { modprobe wifidog-ng + config_load wifidog-ng + config_foreach parse_whitelist whitelist + procd_open_instance procd_set_param command $BIN procd_set_param respawn diff --git a/net/wifidog-ng/files/wifidog-ng.key b/net/wifidog-ng/files/wifidog-ng.key old mode 100755 new mode 100644 -- 2.30.2