summaryrefslogtreecommitdiff
path: root/state.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-10 14:10:39 +0200
committerJohn Crispin <blogic@openwrt.org>2013-07-11 00:29:42 +0200
commit89eec0d61e15bd3c3cd83d24a17fa5894ae984c1 (patch)
treed4818935574a82ad6df5bb691df3cefbb30b9fb3 /state.c
parent4d06f2e9c8ce792ac531d29d44386c4cea9128ff (diff)
downloadprocd-89eec0d61e15bd3c3cd83d24a17fa5894ae984c1.tar.gz
fix up watchdog init code
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'state.c')
-rw-r--r--state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/state.c b/state.c
index cf0c81d..71890a2 100644
--- 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();