[OpenWrt-Devel] [PATCH] procd: allow running with pid != 1
Paul Spooren
mail at aparcar.org
Tue Sep 3 04:08:50 EDT 2019
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 <mail at 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 at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list