diff options
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-x | meta/recipes-core/systemd/systemd-systemctl/systemctl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index d7d4e0d29a..7fdaf8ce03 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl | |||
@@ -241,6 +241,15 @@ def preset_all(root): | |||
241 | if state == "enable" or state is None: | 241 | if state == "enable" or state is None: |
242 | enable(root, service, location, services) | 242 | enable(root, service, location, services) |
243 | 243 | ||
244 | # If we populate the systemd links we also create /etc/machine-id, which | ||
245 | # allows systemd to boot with the filesystem read-only before generating | ||
246 | # a real value and then committing it back. | ||
247 | # | ||
248 | # For the stateless configuration, where /etc is generated at runtime | ||
249 | # (for example on a tmpfs), this script shouldn't run at all and we | ||
250 | # allow systemd to completely populate /etc. | ||
251 | (root / SYSCONFDIR / "machine-id").touch() | ||
252 | |||
244 | 253 | ||
245 | def mask(root, *services): | 254 | def mask(root, *services): |
246 | systemdir = root / SYSCONFDIR / "systemd" / "system" | 255 | systemdir = root / SYSCONFDIR / "systemd" / "system" |