mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Add another constraint for the built-in watchdog, device exists
- Check if watchdogd *and* `WDT_DEVNODE` exists before registering the built-in watchdogd at boot - Update bootstrap.md with this additional constraint - Update config.md with references to bootstrap and the new constraint Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
2ea613a42b
commit
6dced29b49
3 files changed
+26
-21
No files matched your search
+2
-1
@@ -52,6 +52,7 @@
|
||||
#include "util.h"
|
||||
#include "utmp-api.h"
|
||||
#include "schedule.h"
|
||||
#include "watchdog.h"
|
||||
|
||||
int runlevel = 0; /* Bootstrap 'S' */
|
||||
int cfglevel = RUNLEVEL; /* Fallback if no configured runlevel */
|
||||
@@ -552,7 +553,7 @@ int main(int argc, char *argv[])
|
||||
/*
|
||||
* Start built-in watchdogd as soon as possible, if enabled
|
||||
*/
|
||||
if (which(FINIT_LIBPATH_ "/watchdogd")) {
|
||||
if (which(FINIT_LIBPATH_ "/watchdogd") && fexist(WDT_DEVNODE)) {
|
||||
service_register(SVC_TYPE_SERVICE, "[123456789] name:watchdog :finit " FINIT_LIBPATH_ "/watchdogd -- Finit watchdog daemon", global_rlimit, NULL);
|
||||
wdog = svc_find_by_nameid("watchdog", "finit");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user