chiark / gitweb /
nspawn: create essential base directories at system bootup
[elogind.git] / src / core / machine-id-setup.c
index e2e6d0226995f88b1714a32c4132629bced42dd8..f154800484f823fe1628b7a27826b3ab937ffb5c 100644 (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;