From dee2e818b9b2c6bc6e82b8e040095b908fa49e49 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 4 Nov 2019 13:24:34 +0100 Subject: [PATCH 1/3] keepalived: set default run directory for pid file on build This fixes a runtime startup error on system which does not have a toplevel runtime directory for the pid file. On openwrt the pid is located at /var/run and not on /run. To fix that add a configure option to move the pid location to /var/run. Signed-off-by: Florian Eckert (cherry picked from commit bc98aaa3f711f1cd6f7fa3a65da43411c2db98aa) * Patch adapted for the branch so that it can be applied correctly --- net/keepalived/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index a35f5194b..ec0a6d32d 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.0.18 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software @@ -86,7 +86,8 @@ endef CONFIGURE_ARGS+= \ --with-init=SYSV \ - --disable-nftables + --disable-nftables \ + --with-run-dir="/var/run" ifeq ($(CONFIG_KEEPALIVED_VRRP),) CONFIGURE_ARGS += \ From d41a0b75aac67da9267386bde61c898d37fb3f17 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 29 Apr 2020 19:40:46 +0200 Subject: [PATCH 2/3] keepalived: add script security param to fix warning Openwrt is a single user system. So keepalived is runnig as root. If we add the config options `script_user root` and `enabled_script_security' the following warnings are gone. > local1.info Keepalived_vrrp[5382]: SECURITY VIOLATION - scripts are being executed but script_security not enabled. Signed-off-by: Florian Eckert (cherry picked from commit 1b1ba710632f8f4850f02c22e83734a6c8b5c41a) --- net/keepalived/Makefile | 2 +- net/keepalived/files/keepalived.init | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index ec0a6d32d..e89824e0e 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.0.18 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index cf425e872..dc4eb21d5 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -104,6 +104,9 @@ global_defs() { config_get_bool linkbeat_use_polling "$1" linkbeat_use_polling 0 [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF" + printf '%bscript_user root\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" + printf '%benabled_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" + config_get notification_email "$1" notification_email print_list_indent notification_email From 798c3ba3f9ea21e13646eb36c0a7c58c7e44a3ae Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 15 Jun 2020 11:47:20 +0200 Subject: [PATCH 3/3] keepalived: fix config typo Signed-off-by: Florian Eckert (cherry picked from commit a8a1fbfa0da2676583f0289e7ed2806a3191800c) * Update PKG_RELEASE to 5 --- net/keepalived/Makefile | 2 +- net/keepalived/files/keepalived.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index e89824e0e..4e7e3eb20 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.0.18 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index dc4eb21d5..347783a23 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -105,7 +105,7 @@ global_defs() { [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF" printf '%bscript_user root\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" - printf '%benabled_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" + printf '%benable_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" config_get notification_email "$1" notification_email print_list_indent notification_email