diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-08-05 13:22:58 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2021-08-06 11:11:14 +0100 |
commit | 2525682565b372b9b83c848bfe89c025fed47a1d (patch) | |
tree | c3851d2e95a62fff3fc5dd8e068205d7b4e8533b | |
parent | 32a2ee2bb4fa265577c883403748c909cd6784dd (diff) | |
download | systemd-2525682565b372b9b83c848bfe89c025fed47a1d.tar.gz |
units: make sure systemd-tmpfiles-{setup,clean} don't survive switch-root
Normally, these services are killed because we run isolate. But I booted into
emergency mode (because of a futher bug with us timing out improperly on the
luks password prompt), and then continuted to the host system by running
'systemctl start systemd-switch-root.service'. My error, but the results are
confusing and bad: systemd in the host sees 'systemd-tmpfiles-setup.service'
as started successfully, and doesn't restart it, so the setup for /tmp/.X11 is
not done and gdm.service fails. So while we wouldn't encounter this during
normal successful boot, I think it's good to make this more robust.
The dep is added to systemd-tmpfiles-{setup,clean}, because /tmp is not
propagated over switch-root. /dev is, so I didn't touch
systemd-tmpfiles-setup-dev.service.
-rw-r--r-- | units/systemd-tmpfiles-clean.service | 2 | ||||
-rw-r--r-- | units/systemd-tmpfiles-setup.service | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/units/systemd-tmpfiles-clean.service b/units/systemd-tmpfiles-clean.service index e962954f06..7aee6463bd 100644 --- a/units/systemd-tmpfiles-clean.service +++ b/units/systemd-tmpfiles-clean.service @@ -11,7 +11,7 @@ Description=Cleanup of Temporary Directories Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) DefaultDependencies=no -Conflicts=shutdown.target +Conflicts=shutdown.target initrd-switch-root.service After=local-fs.target time-set.target Before=shutdown.target diff --git a/units/systemd-tmpfiles-setup.service b/units/systemd-tmpfiles-setup.service index 3f028d2533..bc29dbc8c9 100644 --- a/units/systemd-tmpfiles-setup.service +++ b/units/systemd-tmpfiles-setup.service @@ -11,7 +11,7 @@ Description=Create Volatile Files and Directories Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) DefaultDependencies=no -Conflicts=shutdown.target +Conflicts=shutdown.target initrd-switch-root.service After=local-fs.target systemd-sysusers.service systemd-journald.service Before=sysinit.target shutdown.target RefuseManualStop=yes |