From a1a1d1c6cf0ae302f76bc39a3d83aba66aee3228 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 15 May 2016 16:18:41 +0200 Subject: [PATCH] preinit: create a sentinel file during preinit Signed-off-by: John Crispin --- initd/preinit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/initd/preinit.c b/initd/preinit.c index f38d8ef..51fde31 100644 --- a/initd/preinit.c +++ b/initd/preinit.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -64,6 +65,7 @@ spawn_procd(struct uloop_process *proc, int ret) unsetenv("INITRAMFS"); unsetenv("PREINIT"); + unlink("/tmp/.preinit"); DEBUG(2, "Exec to real procd now\n"); if (wdt_fd) setenv("WDTFD", wdt_fd, 1); @@ -104,6 +106,7 @@ preinit(void) uloop_process_add(&plugd_proc); setenv("PREINIT", "1", 1); + creat("/tmp/.preinit", 0600); preinit_proc.cb = spawn_procd; preinit_proc.pid = fork(); -- 2.25.1