Allow to run procd from a bash script and still let it fire up system
services. This is handy when running from within a container that does
not start any init command on pid 1, like on GitLab CI.

Signed-off-by: Paul Spooren <m...@aparcar.org>
---
 procd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/procd.c b/procd.c
index 3de6208..a78c538 100644
--- a/procd.c
+++ b/procd.c
@@ -74,10 +74,7 @@ int main(int argc, char **argv)
        setsid();
        uloop_init();
        procd_signal();
-       if (getpid() != 1)
-               procd_connect_ubus();
-       else
-               procd_state_next();
+       procd_state_next();
        uloop_run();
        uloop_done();
 
-- 
2.23.0.rc1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to