Use the WATCHDOG_USEC env variable to define the watchdog timeout
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Fri, 27 Jul 2012 13:27:15 +0000 (14:27 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Fri, 27 Jul 2012 13:34:40 +0000 (14:34 +0100)
commit645d787882cc98ddd0e57c00411c2356eb83d5d6
treed7017f232c8e5e514ad564a4b05b666cffc4af37
parent9f82b60cbb9a931b8d9674e26e5abf7a51513b3a
Use the WATCHDOG_USEC env variable to define the watchdog timeout

Also, set WatchdogSec to 5 seconds in boot-manager.service.in and
nsm-dummy.service.in.

The way this works is that systemd will take the WatchdogSec value,
convert it to micro-seconds and set the WATCHDOG_USEC environment
variable for the boot manager or nsm-dummy process. The boot manager
or NSM dummy then halves that value and creates the WatchdogClient
so that it calls sd_notify(0, WATCHDOG=1) twice in each
WATCHDOG_USEC interval. If WATCHDOG_USEC can't be parsed into a
number or if it is not set, the systemd watchdog timestamp is
never updated.

This is what systemd's requires services to do in order to support its
watchdog feature properly.
boot-manager/boot-manager-application.c
boot-manager/boot-manager.service.in
nsm-dummy/nsm-dummy-application.c
nsm-dummy/systemd/nsm-dummy.service.in