2017-11-18 16:35:03 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
#
|
2010-09-28 23:30:41 +00:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-11 22:20:58 +00: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-28 23:30:41 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
2010-10-18 20:38:41 +00:00
|
|
|
Description=Cleanup of Temporary Directories
|
2013-04-23 07:56:32 +00:00
|
|
|
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
2010-09-28 23:30:41 +00:00
|
|
|
DefaultDependencies=no
|
2014-06-19 22:15:39 +00:00
|
|
|
Conflicts=shutdown.target
|
2014-08-26 19:17:22 +00:00
|
|
|
After=local-fs.target time-sync.target
|
2014-06-19 22:15:39 +00:00
|
|
|
Before=shutdown.target
|
2010-09-28 23:30:41 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2011-02-13 13:04:57 +00:00
|
|
|
ExecStart=@rootbindir@/systemd-tmpfiles --clean
|
units: use SuccessExitStatus to ignore syntax errors in tmpfiles
This makes sense from the point of view of the whole distribution:
if there are some specific files that have syntax problems, or unknown
users or groups, or use unsupported features, failing the whole service
is not useful.
In particular, services with tmpfiles --boot should not be started after boot.
The premise of --boot is that there are actions which are only safe to do once
during boot, because the state evolves later through other means and re-running
the boot-time setup would destroy it. If services with --boot fail in the
initial transaction, they would be re-run later on when a unit which
(indirectly) depends on them is started, causing problems.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1507501.
(If we had a mode where a service would at most run once, and would not be
started in subsequent transactions, that'd be a good additional safeguard.
Using ExecStart=-... is a bit like that, but it causes all failure to be
ignored, which is too big of a hammer.)
2017-11-22 13:18:25 +00:00
|
|
|
SuccessExitStatus=65
|
2010-10-18 20:38:41 +00:00
|
|
|
IOSchedulingClass=idle
|