chiark / gitweb /
sd-icmp6-nd: Add function to stop ongoing ICMPv6 discovery
[elogind.git] / src / nspawn / nspawn.c
index 29ddfbb1ffc36340782d8689459d9788fcd7fcce..0a8dc0cf301cd7bf047487e75fed5cc33db06c44 100644 (file)
@@ -89,6 +89,7 @@
 #include "gpt.h"
 #include "siphash24.h"
 #include "copy.h"
+#include "base-filesystem.h"
 
 #ifdef HAVE_SECCOMP
 #include "seccomp-util.h"
@@ -824,7 +825,7 @@ static int setup_timezone(const char *dest) {
 }
 
 static int setup_resolv_conf(const char *dest) {
-        char _cleanup_free_ *where = NULL;
+        _cleanup_free_ char *where = NULL;
 
         assert(dest);
 
@@ -2799,7 +2800,7 @@ int main(int argc, char *argv[]) {
 
                 if (arg_boot) {
                         if (path_is_os_tree(arg_directory) <= 0) {
-                                log_error("Directory %s doesn't look like an OS root directory (/etc/os-release is missing). Refusing.", arg_directory);
+                                log_error("Directory %s doesn't look like an OS root directory (os-release file is missing). Refusing.", arg_directory);
                                 goto finish;
                         }
                 } else {
@@ -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("Failed to create the base filesystem: %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");