nspawn: create essential base directories at system bootup

This allows us to bootup a rootfs with a /usr directory only.
This commit is contained in:
Kay Sievers
2014-06-24 15:41:03 +02:00
parent 96e2644150
commit 3577de7ac3
5 changed files with 117 additions and 1 deletions
+1
View File
@@ -181,6 +181,7 @@ int machine_id_setup(const char *root) {
* will be owned by root it doesn't matter much, but maybe
* people look. */
mkdir_parents(etc_machine_id, 0755);
fd = open(etc_machine_id, O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444);
if (fd >= 0)
writable = true;