Blame SOURCES/0099-watchdog-5.16-rhseldoc.patch

2dedfa
diff --git a/watchdog.8 b/watchdog.8
2dedfa
index 9b7c6e7..052b1e1 100644
2dedfa
--- a/watchdog.8
2dedfa
+++ b/watchdog.8
2dedfa
@@ -216,6 +216,7 @@ by
2dedfa
 .BR watchdog .
2dedfa
 So you can for instance restart the server from your
2dedfa
 .IR repair-binary .
2dedfa
+See the Systemd section below for additinal information.
2dedfa
 .PP
2dedfa
 .B watchdog
2dedfa
 will try periodically to fork itself to see whether the process
2dedfa
@@ -242,6 +243,8 @@ a given interface for traffic. If no traffic arrives the network is
2dedfa
 considered unreachable causing a soft reboot or action from the
2dedfa
 repair binary.
2dedfa
 .PP
2dedfa
+To start the watchdog when network is available see the Systemd section below.
2dedfa
+.PP
2dedfa
 .B watchdog
2dedfa
 can run an external command for user-defined tests. A return code not equal 0
2dedfa
 means an error occurred and watchdog should react. If the external command is
2dedfa
@@ -348,6 +351,9 @@ Child process did not return in time.
2dedfa
 246
2dedfa
 Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit
2dedfa
 number).
2dedfa
+.PP
2dedfa
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
2dedfa
+for your test-binary configuration.
2dedfa
 .TP
2dedfa
 245
2dedfa
 Reserved for an unknown result, for example a slow background test that is
2dedfa
@@ -375,6 +381,9 @@ repair-maximum
2dedfa
 controls the number of successive repair attempts that report 0 (i.e. success) but
2dedfa
 fail to clear the tested fault. If this is exceeded then a reboot takes place. If set
2dedfa
 to zero then a reboot can always be blocked by the repair program reporting success.
2dedfa
+.PP
2dedfa
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
2dedfa
+for your repair-binary configuration.
2dedfa
 .SH "TEST DIRECTORY"
2dedfa
 Executables placed in the test directory are discovered by watchdog on
2dedfa
 startup and are automatically executed.  They are bounded time-wise by
2dedfa
@@ -413,6 +422,27 @@ As for the repair binary, the configuration parameter
2dedfa
 repair-maximum
2dedfa
 also controls the number of successive repair attempts that report success
2dedfa
 (return 0) but fail to clear the fault.
2dedfa
+.SH SYSTEMD
2dedfa
+To start watchdog after the network is available:
2dedfa
+.PP
2dedfa
+.br
2dedfa
+systemctl disable watchdog
2dedfa
+.br
2dedfa
+systemctl enable NetworkManager-wait-online
2dedfa
+.br
2dedfa
+systemctl enable watchdog-ping
2dedfa
+.PP
2dedfa
+
2dedfa
+When using custom service pid check with custom service
2dedfa
+systemd unit file please be aware the "Requires="
2dedfa
+does dependent service deactivation.
2dedfa
+Using "Before=watchdog.service" or "Before=watchdog-ping.service"
2dedfa
+in the custom service unit file may be the desired operation instead.
2dedfa
+See systemd.unit documentation for more details.
2dedfa
+
2dedfa
+.SH SELINUX
2dedfa
+The directories /etc/watchdog.d/ and /usr/libexec/watchdog/scripts/ are
2dedfa
+recognized locations for custom executables.
2dedfa
 .SH BUGS
2dedfa
 None known so far.
2dedfa
 .SH AUTHORS
2dedfa
@@ -431,4 +461,4 @@ The watchdog device.
2dedfa
 The pid file of the running
2dedfa
 .BR watchdog .
2dedfa
 .SH "SEE ALSO"
2dedfa
-.BR watchdog.conf (5)
2dedfa
+.BR watchdog.conf (5), systemd.unit (5)
2dedfa
diff --git a/watchdog.conf b/watchdog.conf
2dedfa
index 207da3e..7dd3cb3 100644
2dedfa
--- a/watchdog.conf
2dedfa
+++ b/watchdog.conf
2dedfa
@@ -75,7 +75,9 @@ priority		= 1
2dedfa
 # If you have a custom binary/script to handle errors then uncomment
2dedfa
 # this line and provide the path. For 'v1' test binary files they also
2dedfa
 # handle error cases.
2dedfa
-
2dedfa
+# With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
2dedfa
+	
2dedfa
+# or /etc/watchdog.d/ for your test-binary and repair-binary configuration.
2dedfa
 #repair-binary		= /usr/sbin/repair
2dedfa
 #repair-timeout		= 60
2dedfa
 
2dedfa
@@ -175,6 +177,13 @@ priority		= 1
2dedfa
 #temperature-sensor	=
2dedfa
 #max-temperature	= 90
2dedfa
 
2dedfa
+# When using custom service pid check with custom service
2dedfa
+# systemd unit file please be aware the "Requires="
2dedfa
+# does dependent service deactivation.
2dedfa
+# Using "Before=watchdog.service" or "Before=watchdog-ping.service"
2dedfa
+# in the custom service unit file may be the desired operation instead.
2dedfa
+# See man 5 systemd.unit for more details.
2dedfa
+#
2dedfa
 # Check for a running process/daemon by its PID file. For example,
2dedfa
 # check if rsyslogd is still running by enabling the following line:
2dedfa
 
2dedfa
diff --git a/watchdog.conf.5 b/watchdog.conf.5
2dedfa
index edf7c8b..72c3bc2 100644
2dedfa
--- a/watchdog.conf.5
2dedfa
+++ b/watchdog.conf.5
2dedfa
@@ -130,6 +130,7 @@ pidfile = <pidfilename>
2dedfa
 Set pidfile name for daemon test mode.
2dedfa
 This option can be given as often as you like to check several daemons, assuming
2dedfa
 they write their post-forking PID to the specified files.
2dedfa
+See the Systemd section in watchdog (8) for more information.
2dedfa
 .TP
2dedfa
 ping = <ip-addr>
2dedfa
 Set IPv4 address for ping mode.
2dedfa
@@ -147,6 +148,8 @@ aliased IP interfaces.
2dedfa
 .TP
2dedfa
 test-binary = <testbin>
2dedfa
 Execute the given binary to do some user defined tests.
2dedfa
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
2dedfa
+for your test-binary configuration.
2dedfa
 .TP
2dedfa
 test-timeout = <timeout in seconds>
2dedfa
 User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
2dedfa
@@ -154,6 +157,8 @@ User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
2dedfa
 repair-binary = <repbin>
2dedfa
 Execute the given binary in case of a problem instead of shutting down the
2dedfa
 system.
2dedfa
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
2dedfa
+for your repair-binary configuration.
2dedfa
 .TP
2dedfa
 repair-timeout = <timeout in seconds>
2dedfa
 repair command may only run for <timeout> seconds. Set to 0 for 'unlimited', but
2dedfa
@@ -188,6 +193,7 @@ Set the schedule priority for realtime mode passed to sched_setscheduler().
2dedfa
 .TP
2dedfa
 test-directory = <test directory>
2dedfa
 Set the directory to run user test/repair scripts.  Default is '/etc/watchdog.d'
2dedfa
+The /etc/watchdog.d/ is recognized by SELinux policy.
2dedfa
 See the Test Directory section in watchdog(8) for more information.
2dedfa
 .TP
2dedfa
 log-dir = <log directory>