diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-28 14:58:01 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-30 09:53:36 +0100 |
commit | 13590ca98ac2fd4939b683adbfdd63392b559f3f (patch) | |
tree | 37a267d3ac4ca067fea1d2a1789c1a055ed7b707 /state.c | |
parent | 890ac34c460fbb753bd4303b201d11aebd27a570 (diff) | |
download | unitd-13590ca98ac2fd4939b683adbfdd63392b559f3f.tar unitd-13590ca98ac2fd4939b683adbfdd63392b559f3f.zip |
Strip down procd to the necessary code, update copyright
Diffstat (limited to 'state.c')
-rw-r--r-- | state.c | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -1,6 +1,7 @@ /* * Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org> * Copyright (C) 2013 John Crispin <blogic@openwrt.org> + * Copyright (C) 2015 Matthias Schiffer <mschiffer@universe-factory.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1 @@ -22,7 +23,6 @@ #include "procd.h" #include "syslog.h" -#include "plug/hotplug.h" #include "watchdog.h" #include "service/service.h" #include "utils/utils.h" @@ -30,7 +30,6 @@ enum { STATE_NONE = 0, STATE_EARLY, - STATE_UBUS, STATE_INIT, STATE_RUNNING, STATE_SHUTDOWN, @@ -99,17 +98,9 @@ static void state_enter(void) switch (state) { case STATE_EARLY: - LOG("- early -\n"); watchdog_init(0); - hotplug("/etc/hotplug.json"); - procd_coldplug(); - break; - - case STATE_UBUS: - // try to reopen incase the wdt was not available before coldplug - watchdog_init(0); - set_stdio("console"); - LOG("- ubus -\n"); + LOG("- early -\n"); + procd_early(); procd_connect_ubus(); service_init(); service_start_early("ubus", ubus_cmd); @@ -185,7 +176,7 @@ void procd_state_next(void) void procd_state_ubus_connect(void) { - if (state == STATE_UBUS) + if (state == STATE_EARLY) procd_state_next(); } |