This patch reduces the usage of sysV init scripts by the systemd
service files and introduces the usage of SendSIGKILL=no to
prevent ungraceful killing.
Bug-Url:
https://bugzilla.redhat.com/1064991
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
init.d/sanlock-tmpfile.conf | 1 +
init.d/sanlock.service | 4 ++--
init.d/wdmd | 3 +++
init.d/wdmd-tmpfile.conf | 1 +
init.d/wdmd.service | 5 +++--
5 files changed, 10 insertions(+), 4 deletions(-)
create mode 100644 init.d/sanlock-tmpfile.conf
create mode 100644 init.d/wdmd-tmpfile.conf
diff --git a/init.d/sanlock-tmpfile.conf b/init.d/sanlock-tmpfile.conf
new file mode 100644
index 0000000..63fb676
--- /dev/null
+++ b/init.d/sanlock-tmpfile.conf
@@ -0,0 +1 @@
+d /var/run/sanlock 755 sanlock sanlock
diff --git a/init.d/sanlock.service b/init.d/sanlock.service
index 64d9ced..07bccd7 100644
--- a/init.d/sanlock.service
+++ b/init.d/sanlock.service
@@ -6,8 +6,8 @@ Wants=wdmd.service
[Service]
Type=forking
ControlGroup=cpu:/
-ExecStart=/lib/systemd/systemd-sanlock start
-ExecStop=/lib/systemd/systemd-sanlock stop
+ExecStart=/usr/sbin/sanlock daemon -U sanlock -G sanlock
+SendSIGKILL=no
[Install]
WantedBy=multi-user.target
diff --git a/init.d/wdmd b/init.d/wdmd
index 6ca9279..d3038bc 100644
--- a/init.d/wdmd
+++ b/init.d/wdmd
@@ -138,6 +138,9 @@ case "$1" in
force-reload)
force_reload
;;
+ watchdog-check)
+ watchdog_check
+ ;;
status)
rh_status
;;
diff --git a/init.d/wdmd-tmpfile.conf b/init.d/wdmd-tmpfile.conf
new file mode 100644
index 0000000..a1e742a
--- /dev/null
+++ b/init.d/wdmd-tmpfile.conf
@@ -0,0 +1 @@
+d /var/run/wdmd 755 sanlock sanlock
diff --git a/init.d/wdmd.service b/init.d/wdmd.service
index efe46bf..882f52d 100644
--- a/init.d/wdmd.service
+++ b/init.d/wdmd.service
@@ -5,8 +5,9 @@ After=syslog.target
[Service]
Type=forking
ControlGroup=cpu:/
-ExecStart=/lib/systemd/systemd-wdmd start
-ExecStop=/lib/systemd/systemd-wdmd stop
+ExecStartPre=/lib/systemd/systemd-wdmd watchdog-check
+ExecStart=/usr/sbin/wdmd -G sanlock
+SendSIGKILL=no
[Install]
WantedBy=multi-user.target
--
1.8.5.3