From 70997fb4c583ab7a54946f3079bae2697f92bf75 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 5 Feb 2023 01:16:18 +0100 Subject: [PATCH] Allow Finit watchdogd and keventd to start as early as possible In particular watchdogd we want to start in runlevel S to ensure we start kicking the WDT. (Some HW WDTs are enabled from power on.) Signed-off-by: Joachim Wiberg --- src/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index fb5b3ae5..0e906993 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1213,7 +1213,7 @@ int conf_init(uev_ctx_t *ctx) * Start built-in watchdogd as soon as possible, if enabled */ if (whichp(FINIT_LIBPATH_ "/watchdogd") && fexist(WDT_DEVNODE)) { - service_register(SVC_TYPE_SERVICE, "[123456789] cgroup.init name:watchdog :finit " FINIT_LIBPATH_ "/watchdogd -- Finit watchdog daemon", global_rlimit, NULL); + service_register(SVC_TYPE_SERVICE, "[S123456789] cgroup.init name:watchdog :finit " FINIT_LIBPATH_ "/watchdogd -- Finit watchdog daemon", global_rlimit, NULL); wdog = svc_find("watchdog", "finit"); } @@ -1221,7 +1221,7 @@ int conf_init(uev_ctx_t *ctx) * Start kernel event daemon as soon as possible, if enabled */ if (whichp(FINIT_LIBPATH_ "/keventd")) - service_register(SVC_TYPE_SERVICE, "[123456789] cgroup.init " FINIT_LIBPATH_ "/keventd -- Finit kernel event daemon", global_rlimit, NULL); + service_register(SVC_TYPE_SERVICE, "[S123456789] cgroup.init " FINIT_LIBPATH_ "/keventd -- Finit kernel event daemon", global_rlimit, NULL); dbg("Allow plugins to register early runlevel 1 run/task/services ..."); plugin_run_hooks(HOOK_SVC_PLUGIN);