diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index f020e11f82..21ec9f73da 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.2.8 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software diff --git a/net/keepalived/files/etc/hotplug.d/keepalived/511-firewall b/net/keepalived/files/etc/hotplug.d/keepalived/511-firewall index d8619e9f18..b85a703819 100644 --- a/net/keepalived/files/etc/hotplug.d/keepalived/511-firewall +++ b/net/keepalived/files/etc/hotplug.d/keepalived/511-firewall @@ -5,6 +5,7 @@ set_service_name firewall +set_skip_running_check set_reload_if_sync add_sync_file /etc/config/firewall diff --git a/net/keepalived/files/lib/functions/keepalived/hotplug.sh b/net/keepalived/files/lib/functions/keepalived/hotplug.sh index 8691872c6d..57db374e28 100644 --- a/net/keepalived/files/lib/functions/keepalived/hotplug.sh +++ b/net/keepalived/files/lib/functions/keepalived/hotplug.sh @@ -31,17 +31,17 @@ _service() { [ ! -x "$rc" ] && return case $1 in - start) $rc running || $rc start ;; - stop) $rc running && $rc stop ;; + start) _service_running_check "$rc" || $rc start ;; + stop) _service_running_check "$rc" && $rc stop ;; reload) - if $rc running; then + if _service_running_check "$rc"; then $rc reload else $rc start fi ;; restart) - if $rc running; then + if _service_running_check "$rc"; then $rc restart else $rc start @@ -50,6 +50,10 @@ _service() { esac } +_service_running_check() { + skip_running_check || "$1" running +} + _start_service() { _service start } @@ -158,6 +162,14 @@ backup_and_stop() { get_var_flag NOTIFY_BACKUP_STOP 1 } +set_skip_running_check() { + set_var NOTIFY_SKIP_RUNNING 1 +} + +skip_running_check() { + get_var_flag NOTIFY_SKIP_RUNNING +} + set_reload_if_sync() { set_var NOTIFY_SYNC_RELOAD "${1:-1}" }