Blame SOURCES/0004-watchdog-5.13-rhseldoc.patch

8486e6
diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8
8486e6
--- watchdog-5.15.old/watchdog.8	2016-02-26 12:05:00.000000000 +0000
8486e6
+++ watchdog-5.15/watchdog.8	2018-02-13 08:54:00.860681339 +0000
8486e6
@@ -215,6 +215,7 @@
8486e6
 .BR watchdog .
8486e6
 So you can for instance restart the server from your
8486e6
 .IR repair-binary .
8486e6
+See the Systemd section below for additinal information.
8486e6
 .PP
8486e6
 .B watchdog
8486e6
 will try periodically to fork itself to see whether the process
8486e6
@@ -241,6 +242,8 @@
8486e6
 considered unreachable causing a soft reboot or action from the
8486e6
 repair binary.
8486e6
 .PP
8486e6
+To start the watchdog when network is available see the Systemd section below.
8486e6
+.PP
8486e6
 .B watchdog
8486e6
 can run an external command for user-defined tests. A return code not equal 0
8486e6
 means an error occurred and watchdog should react. If the external command is
8486e6
@@ -350,6 +353,9 @@
8486e6
 246
8486e6
 Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit
8486e6
 number).
8486e6
+.PP
8486e6
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
8486e6
+for your test-binary configuration.
8486e6
 .TP
8486e6
 245
8486e6
 Reserved for an unknown result, for example a slow background test that is
8486e6
@@ -377,6 +383,9 @@
8486e6
 controls the number of successive repair attempts that report 0 (i.e. success) but
8486e6
 fail to clear the tested fault. If this is exceeded then a reboot takes place. If set
8486e6
 to zero then a reboot can always be blocked by the repair program reporting success.
8486e6
+.PP
8486e6
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
8486e6
+for your repair-binary configuration.
8486e6
 .SH "TEST DIRECTORY"
8486e6
 Executables placed in the test directory are discovered by watchdog on
8486e6
 startup and are automatically executed.  They are bounded time-wise by
8486e6
@@ -415,6 +424,27 @@
8486e6
 repair-maximum
8486e6
 also controls the number of successive repair attempts that report success
8486e6
 (return 0) but fail to clear the fault.
8486e6
+.SH SYSTEMD
8486e6
+To start watchdog after the network is available:
8486e6
+.PP
8486e6
+.br
8486e6
+systemctl disable watchdog
8486e6
+.br
8486e6
+systemctl enable NetworkManager-wait-online
8486e6
+.br
8486e6
+systemctl enable watchdog-ping
8486e6
+.PP
8486e6
+
8486e6
+When using custom service pid check with custom service
8486e6
+systemd unit file please be aware the "Requires="
8486e6
+does dependent service deactivation.
8486e6
+Using "Before=watchdog.service" or "Before=watchdog-ping.service"
8486e6
+in the custom service unit file may be the desired operation instead.
8486e6
+See systemd.unit documentation for more details.
8486e6
+
8486e6
+.SH SELINUX
8486e6
+The directories /etc/watchdog.d/ and /usr/libexec/watchdog/scripts/ are
8486e6
+recognized locations for custom executables.
8486e6
 .SH BUGS
8486e6
 None known so far.
8486e6
 .SH AUTHORS
8486e6
@@ -433,4 +463,4 @@
8486e6
 The pid file of the running
8486e6
 .BR watchdog .
8486e6
 .SH "SEE ALSO"
8486e6
-.BR watchdog.conf (5)
8486e6
+.BR watchdog.conf (5), systemd.unit (5)
8486e6
diff -ur watchdog-5.15.old/watchdog.conf watchdog-5.15/watchdog.conf
8486e6
--- watchdog-5.15.old/watchdog.conf	2016-02-26 12:05:00.000000000 +0000
8486e6
+++ watchdog-5.15/watchdog.conf	2018-02-13 08:52:18.899721271 +0000
8486e6
@@ -16,6 +16,8 @@
8486e6
 #min-memory		= 1
8486e6
 #allocatable-memory	= 1
8486e6
 
8486e6
+# With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
8486e6
+# or /etc/watchdog.d/ for your test-binary and repair-binary configuration.
8486e6
 #repair-binary		= /usr/sbin/repair
8486e6
 #repair-timeout		= 60
8486e6
 #test-binary		=
8486e6
@@ -45,5 +47,12 @@
8486e6
 realtime		= yes
8486e6
 priority		= 1
8486e6
 
8486e6
+# When using custom service pid check with custom service
8486e6
+# systemd unit file please be aware the "Requires="
8486e6
+# does dependent service deactivation.
8486e6
+# Using "Before=watchdog.service" or "Before=watchdog-ping.service"
8486e6
+# in the custom service unit file may be the desired operation instead.
8486e6
+# See man 5 systemd.unit for more details.
8486e6
+#
8486e6
 # Check if rsyslogd is still running by enabling the following line
8486e6
 #pidfile		= /var/run/rsyslogd.pid
8486e6
diff -ur watchdog-5.15.old/watchdog.conf.5 watchdog-5.15/watchdog.conf.5
8486e6
--- watchdog-5.15.old/watchdog.conf.5	2016-02-26 12:05:00.000000000 +0000
8486e6
+++ watchdog-5.15/watchdog.conf.5	2018-02-13 08:52:18.898721271 +0000
8486e6
@@ -105,6 +105,7 @@
8486e6
 pidfile = <pidfilename>
8486e6
 Set pidfile name for server test mode.
8486e6
 This option can be given as often as you like to check several servers.
8486e6
+See the Systemd section in watchdog (8) for more information.
8486e6
 .TP
8486e6
 ping = <ip-addr>
8486e6
 Set IPv4 address for ping mode.
8486e6
@@ -119,6 +120,8 @@
8486e6
 .TP
8486e6
 test-binary = <testbin>
8486e6
 Execute the given binary to do some user defined tests.
8486e6
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
8486e6
+for your test-binary configuration.
8486e6
 .TP
8486e6
 test-timeout = <timeout in seconds>
8486e6
 User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
8486e6
@@ -126,6 +129,8 @@
8486e6
 repair-binary = <repbin>
8486e6
 Execute the given binary in case of a problem instead of shutting down the
8486e6
 system.
8486e6
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
8486e6
+for your repair-binary configuration.
8486e6
 .TP
8486e6
 repair-timeout = <timeout in seconds>
8486e6
 repair command may only run for <timeout> seconds. Set to 0 for 'unlimited', but
8486e6
@@ -156,6 +161,7 @@
8486e6
 .TP
8486e6
 test-directory = <test directory>
8486e6
 Set the directory to run user test/repair scripts.  Default is '/etc/watchdog.d'
8486e6
+The /etc/watchdog.d/ is recognized by SELinux policy.
8486e6
 See the Test Directory section in watchdog(8) for more information.
8486e6
 .TP
8486e6
 log-dir = <log directory>