aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h1
-rw-r--r--sinit.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index a257b45..ac9cf9b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -6,6 +6,7 @@ static Arg rcinitarg = { .v = rcinitcmd };
static const char *rcrebootcmd[] = { "/bin/rc.shutdown", "reboot", NULL };
static const char *rcpoweroffcmd[] = { "/bin/rc.shutdown", "poweroff", NULL };
+/* if you make this path NULL, then sinit will not use a FIFO */
static const char *fifopath = "/var/run/sinit.fifo";
static Command commands[] = {
{ "poweroff", spawn, { .v = rcpoweroffcmd } },
diff --git a/sinit.c b/sinit.c
index 765d565..3942457 100644
--- a/sinit.c
+++ b/sinit.c
@@ -54,6 +54,9 @@ main(void)
spawn(&rcinitarg);
+ if (!fifopath)
+ return EXIT_SUCCESS;
+
unlink(fifopath);
umask(0);
if (mkfifo(fifopath, 0600) < 0)