X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=state.c;h=90e883c50c5fb2dee1cd009b098c9247bf76620e;hp=cf0c81d2c6f19e263eef3ae2a890684c19ead771;hb=8fd40e8352bac9992ca4ebd50998d4e961f5404b;hpb=0d44f0de9eacf687182ebebfcb1f9496dbf3bc32 diff --git a/state.c b/state.c index cf0c81d..90e883c 100644 --- a/state.c +++ b/state.c @@ -40,12 +40,14 @@ static void state_enter(void) switch (state) { case STATE_EARLY: LOG("- early -\n"); - watchdog_init(); + watchdog_init(0); hotplug("/etc/hotplug.json"); procd_coldplug(); break; case STATE_INIT: + // try to reopen incase the wdt was not available before coldplug + watchdog_init(0); LOG("- init -\n"); log_init(); procd_connect_ubus(); @@ -86,7 +88,7 @@ void procd_state_next(void) void procd_shutdown(int event) { - DEBUG(1, "Shutting down system with event %x\n", reboot_event); + DEBUG(1, "Shutting down system with event %x\n", event); reboot_event = event; state = STATE_SHUTDOWN; state_enter();