]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd-systemctl: Create machine-id with "uninitialized" text in it
authorMarek Vasut <marex@denx.de>
Mon, 27 Feb 2023 19:15:48 +0000 (20:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Feb 2023 22:58:01 +0000 (22:58 +0000)
Instead of creating empty /etc/machine-id file using touch, write
text "uninitialized" into it. Systemd requires "uninitialized" in
the /etc/machine-id file to trigger systemd-firstboot .

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd-systemctl/systemctl

index cddae75a0679fb4df5f7058d65261f7fd63d9cf5..45b29671ee3cb82d9cffb9f19969687fba083e93 100755 (executable)
@@ -302,7 +302,7 @@ def preset_all(root):
     # For the stateless configuration, where /etc is generated at runtime
     # (for example on a tmpfs), this script shouldn't run at all and we
     # allow systemd to completely populate /etc.
-    (root / SYSCONFDIR / "machine-id").touch()
+    (root / SYSCONFDIR / "machine-id").write_text("uninitialized")
 
 
 def main():