add service_validator support
[project/procd.git] / state.c
diff --git a/state.c b/state.c
index 9cde905..f83032c 100644 (file)
--- a/state.c
+++ b/state.c
@@ -20,6 +20,7 @@
 #include "syslog.h"
 #include "hotplug.h"
 #include "watchdog.h"
+#include "service.h"
 
 enum {
        STATE_NONE = 0,
@@ -51,6 +52,7 @@ static void state_enter(void)
                LOG("- init -\n");
                log_init();
                procd_connect_ubus();
+               service_init();
                procd_inittab();
                procd_inittab_run("respawn");
                procd_inittab_run("askconsole");
@@ -88,7 +90,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();