banip: update 0.8.0-2
authorDirk Brenken <dev@brenken.org>
Mon, 20 Feb 2023 18:17:16 +0000 (19:17 +0100)
committerDirk Brenken <dev@brenken.org>
Mon, 20 Feb 2023 18:18:31 +0000 (19:18 +0100)
* fix a potential race condition during initial startup (after flash) which leads to a "disabled" service

Signed-off-by: Dirk Brenken <dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
net/banip/Makefile
net/banip/files/banip.init

index a816ec858d1339a73049e2cb0885710774fe4b5d..5070d8aa6dbfc3fdc79c4766330688392e67c2e5 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=banip
 PKG_VERSION:=0.8.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index ab126f230489ad5e3f69ca08e02c5327d880eda1..61639acfbd06fb6c6fbce9dc8e88c89bb84fd411 100755 (executable)
@@ -18,8 +18,8 @@ ban_funlib="/usr/lib/banip-functions.sh"
 ban_pidfile="/var/run/banip.pid"
 ban_lock="/var/run/banip.lock"
 
-[ ! -r "${ban_funlib}" ] && exit 1
 [ "${action}" = "stop" ] && ! /etc/init.d/banip running && exit 0
+[ ! -r "${ban_funlib}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "stop" ] || [ "${action}" = "report" ] || [ "${action}" = "search" ] || [ "${action}" = "status" ]; } && exit 1
 [ -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ]; } && exit 1
 [ ! -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ]; } && mkdir -p "${ban_lock}"