diff options
author | John Crispin <blogic@openwrt.org> | 2013-06-10 09:39:42 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-06-10 10:04:26 +0200 |
commit | c261d39c1ae2db872495c2129c05d1154f46b5c3 (patch) | |
tree | 444d1c43b3a7f03d09d48b318bf7266ffe8891fc | |
parent | f726e77701b2300ef71e6d62a715aab28d8927b0 (diff) | |
download | unitd-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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"); |