Follow-up to 18ab7d3: restore start of built-in watchdogd

This patch restores the start of the built-in/bundled watchdogd.  It is
tracked in the `wdog` variable and handled as an exception at shutdown.

This is also a follow-up to 7b74c99, ensuring that we only kill/stop the
built-in watchdog, not any external.  External ones can register to be
the controlling watchdogd in the system -- Finit is not the arbiter for
singletons, this is up to the system engineer.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-04-19 11:05:07 +02:00
1 parent d82d119729
commit dd437bf0a5
4 files changed
+28 -23

No files matched your search

+8 -9
View File
@@ -7,21 +7,21 @@ else
AM_LDFLAGS = -export-dynamic
endif
sbin_PROGRAMS = finit initctl
sbin_PROGRAMS = finit initctl
pkglibexec_PROGRAMS =
finit_pkglibdir = $(pkglibdir)
finit_pkglib_SCRIPTS = rescue.conf sample.conf
if WATCHDOGD
pkglibexec_PROGRAMS = watchdogd
pkglibexec_PROGRAMS += watchdogd
endif
if LOGIT
pkglibexec_PROGRAMS = logit
logit_SOURCES = logit.c logrotate.c
logit_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99
logit_CFLAGS += $(lite_CFLAGS)
logit_LDADD = $(lite_LIBS)
pkglibexec_PROGRAMS += logit
logit_SOURCES = logit.c logrotate.c
logit_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99
logit_CFLAGS += $(lite_CFLAGS)
logit_LDADD = $(lite_LIBS)
endif
finit_SOURCES = api.c cgroup.c cgroup.h \
@@ -71,7 +71,6 @@ REBOOT_LNKS = reboot shutdown halt poweroff suspend
if WATCHDOGD
watchdogd_SOURCES = watchdog.c watchdog.h
watchdogd_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99
#log.c log.h
endif
# Hook in install to add finit and reboot symlink(s)