From: John Crispin Date: Sun, 15 May 2016 14:20:20 +0000 (+0200) Subject: mount_root: check for preinit sentinel file X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db5d39d48b9d9a77565015c1aafb3ef0d2925f02;p=oweals%2Ffstools.git mount_root: check for preinit sentinel file Signed-off-by: John Crispin --- diff --git a/mount_root.c b/mount_root.c index bf70265..6e06b45 100644 --- a/mount_root.c +++ b/mount_root.c @@ -12,6 +12,9 @@ */ #include +#include +#include +#include #include #include @@ -29,8 +32,9 @@ start(int argc, char *argv[1]) { struct volume *root; struct volume *data = volume_find("rootfs_data"); + struct stat s; - if (!getenv("PREINIT")) + if (!getenv("PREINIT") && stat("/tmp/.preinit", &s)) return -1; if (!data) {