]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
chmod /etc/machine-id and not the root directory 1547/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 May 2023 20:41:52 +0000 (22:41 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 May 2023 20:41:52 +0000 (22:41 +0200)
Fixes #1546

mkosi/run.py

index fa8503e93e44dd8c13c7e5be2e4ed63a4db10866..8e13b312df6b826978d1f814c5e4dc87f7b287c7 100644 (file)
@@ -286,10 +286,10 @@ def bwrap(
     ]
 
     if apivfs:
-        if not apivfs.joinpath("etc/machine-id").exists():
+        if not (apivfs / "etc/machine-id").exists():
             # Uninitialized means we want it to get initialized on first boot.
-            apivfs.joinpath("etc/machine-id").write_text("uninitialized\n")
-            apivfs.chmod(0o0444)
+            (apivfs / "etc/machine-id").write_text("uninitialized\n")
+            (apivfs / "etc/machine-id").chmod(0o0444)
 
         cmdline += [
             "--tmpfs", apivfs / "run",