From 3577de7ac39c54821e1d1d946db65e109dfb94b2 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 24 Jun 2014 13:30:11 +0200 Subject: nspawn: create essential base directories at system bootup This allows us to bootup a rootfs with a /usr directory only. --- src/nspawn/nspawn.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nspawn') diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 212f7223bb..501bccae87 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -89,6 +89,7 @@ #include "gpt.h" #include "siphash24.h" #include "copy.h" +#include "base-filesystem.h" #ifdef HAVE_SECCOMP #include "seccomp-util.h" @@ -3008,6 +3009,12 @@ int main(int argc, char *argv[]) { srv_device, srv_device_rw) < 0) goto child_fail; + r = base_filesystem_create(arg_directory); + if (r < 0) { + log_error("creating base filesystem failed: %s", strerror(-r)); + goto child_fail; + } + /* Turn directory into bind mount */ if (mount(arg_directory, arg_directory, "bind", MS_BIND|MS_REC, NULL) < 0) { log_error("Failed to make bind mount: %m"); -- cgit v1.2.3-54-g00ecf