we dont want to continue booting if sysupgrade is in progress
[project/procd.git] / preinit.c
index f322be156e020211a496322b1844a1b185519f7c..c015ebd28d91c8ece7907b42214468e43ee36b85 100644 (file)
--- a/preinit.c
+++ b/preinit.c
@@ -29,6 +29,11 @@ static void spawn_procd(struct uloop_process *proc, int ret)
 {
        char *wdt_fd = watchdog_fd();
        char *argv[] = { "/sbin/procd", NULL };
+       struct stat s;
+
+       if (!stat("/tmp/sysupgrade", &s))
+               while (true)
+                       sleep(1);
 
        unsetenv("INITRAMFS");
        unsetenv("PREINIT");