From d80ecccc98c96ea34136da0a744a882720ffd891 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 8 May 2023 22:41:52 +0200 Subject: [PATCH] chmod /etc/machine-id and not the root directory Fixes #1546 --- mkosi/run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkosi/run.py b/mkosi/run.py index fa8503e93..8e13b312d 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -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", -- 2.47.2