mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
banip: update 0.3.7
* fix a logical glitch in the hotplug event handler
* properly handle fatal iptables errors - even in subshells
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 49b43b81e8)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
[ "${ACTION}" != "add" ] && exit 0
|
||||
|
||||
ban_pidfile="/var/run/banip.pid"
|
||||
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
|
||||
|
||||
if [ "${ban_enabled}" = "1" ] || [ ! -f "${ban_pidfile}" ] || [ -s "${ban_pidfile}" ] || [ "${ACTION}" != "add" ]
|
||||
if [ "${ban_enabled}" = "0" ] && [ ! -s "${ban_pidfile}" ]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
/etc/init.d/banip refresh
|
||||
fi
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user