2020-11-09 07:23:58 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-11-18 19:35:03 +03:00
#
2010-09-29 03:30:41 +04:00
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
2012-04-12 02:20:58 +04:00
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
2010-09-29 03:30:41 +04:00
# (at your option) any later version.
[Unit]
2010-10-19 00:38:41 +04:00
Description = Cleanup of Temporary Directories
2013-04-23 11:56:32 +04:00
Documentation = man:tmpfiles.d(5) man:systemd-tmpfiles(8)
2010-09-29 03:30:41 +04:00
DefaultDependencies = no
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.
2021-08-05 14:22:58 +03:00
Conflicts = shutdown.target initrd-switch-root.service
2018-04-30 15:05:29 +03:00
After = local-fs.target time-set.target
2014-06-20 02:15:39 +04:00
Before = shutdown.target
2010-09-29 03:30:41 +04:00
[Service]
Type = oneshot
2019-12-18 11:14:57 +03:00
ExecStart = systemd-tmpfiles --clean
2019-07-28 16:00:08 +03:00
SuccessExitStatus = DATAERR
2010-10-19 00:38:41 +04:00
IOSchedulingClass = idle