Module: check_mk
Branch: master
Commit: 4e56d264c8d85278c37a3bbb6bc334475141b13e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e56d264c8d852…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 23 15:47:51 2018 +0200
6028 FIX chrony: Fixed incompatibility with RedHat 7.5
The SELinux rules shipped with RedHat 7.5 deny execution of chronyc like
our agent did before. We have changed the agent code to be able to also
work with RedHat 7.5 out of the box.
Change-Id: I4cee0004c4baef0eb8d882de7d9dfab866ac8f10
---
.werks/6028 | 13 +++++++++++++
agents/check_mk_agent.linux | 6 +++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/6028 b/.werks/6028
new file mode 100644
index 0000000..8a5ee3b
--- /dev/null
+++ b/.werks/6028
@@ -0,0 +1,13 @@
+Title: chrony: Fixed incompatibility with RedHat 7.5
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1524491173
+
+The SELinux rules shipped with RedHat 7.5 deny execution of chronyc like
+our agent did before. We have changed the agent code to be able to also
+work with RedHat 7.5 out of the box.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 4f1738b..4f912dc 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -648,7 +648,11 @@ fi
# Time synchronization with Chrony
if type chronyc > /dev/null 2>&1 ; then
# Force successful exit code. Otherwise section will be missing if daemon not running
- run_cached -s chrony 30 "waitmax 5 chronyc -n tracking || true"
+ #
+ # The "| cat" has been added for some kind of regression in RedHat 7.5. The
+ # SELinux rules shipped with that release were denying the chronyc call
+ # without cat.
+ run_cached -s chrony 30 "waitmax 5 chronyc -n tracking | cat || true"
fi
if type nvidia-settings >/dev/null && [ -S /tmp/.X11-unix/X0 ]