Bug#835496: systemd service file changes

Michael Biebl biebl at debian.org
Fri Aug 26 11:55:53 BST 2016


Package: watchdog
Version: 5.15-1
Severity: normal

Hi,

thanks for shipping a service file for wd_keepalive [1]

There are some changes I think should be done:

1/ the sendsigs.omit.d interface is not supported under systemd, so
please drop

ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid'
ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid'

Apparently it's not needed, otherwise you'd have noticed that the above
two lines do nothing under systemd

2/ please drop 
ExecStartPre=-/bin/systemctl reset-failed watchdog.service

If the service failed for a reason, resetting the state on start is not
a good idea.

3/ your services uses DefaultDependencies=yes (which is the default), so
has an implicit Conflicts/Before=shutdown.target. So you can drop that
as well.

The resulting service file would be 

[Unit]
Description=watchdog keepalive daemon
Before=watchdog.service
Conflicts=watchdog.service

[Service]
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
ExecStart=/usr/sbin/wd_keepalive $watchdog_options



Thanks for considering.

Michael

[1] http://sources.debian.net/src/watchdog/5.15-1/debian/wd_keepalive.service/
-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Pkg-systemd-maintainers mailing list