summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-06-10 09:39:42 +0200
committerJohn Crispin <blogic@openwrt.org>2013-06-10 10:04:26 +0200
commitc261d39c1ae2db872495c2129c05d1154f46b5c3 (patch)
tree444d1c43b3a7f03d09d48b318bf7266ffe8891fc
parentf726e77701b2300ef71e6d62a715aab28d8927b0 (diff)
downloadunitd-c261d39c1ae2db872495c2129c05d1154f46b5c3.tar
unitd-c261d39c1ae2db872495c2129c05d1154f46b5c3.zip
we dont want to continue booting if sysupgrade is in progress
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--preinit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/preinit.c b/preinit.c
index f322be1..c015ebd 100644
--- 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");