From: Daan De Meyer Date: Mon, 8 May 2023 20:41:52 +0000 (+0200) Subject: chmod /etc/machine-id and not the root directory X-Git-Tag: v15~175^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1547%2Fhead;p=thirdparty%2Fmkosi.git chmod /etc/machine-id and not the root directory Fixes #1546 --- 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",