fix up watchdog init code
[project/procd.git] / state.c
diff --git a/state.c b/state.c
index cf0c81d..71890a2 100644 (file)
--- a/state.c
+++ b/state.c
@@ -46,6 +46,9 @@ static void state_enter(void)
                break;
 
        case STATE_INIT:
+               // check if the wdt appeared during coldplug
+               if (!watchdog_fd())
+                       watchdog_init();
                LOG("- init -\n");
                log_init();
                procd_connect_ubus();