diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-06-26 22:42:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-06-28 22:01:55 +0200 |
commit | f9c91932b4d83faf0f95624dc82db353d0726425 (patch) | |
tree | 98e3fef1790e0b3214832dfc3d84e5bcbb1e8d40 /man/systemd.exec.xml | |
parent | execute: when recursively chowning StateDirectory= when spawning services, fo... (diff) | |
download | systemd-f9c91932b4d83faf0f95624dc82db353d0726425.tar.xz systemd-f9c91932b4d83faf0f95624dc82db353d0726425.zip |
execute: add support for XDG_STATE_HOME for placing service state data in --user mode
This adds support for the new XDG_STATE_HOME env var that was added to
the xdg basedir spec. Previously, because the basedir spec didn't know
the concept we'd alias the backing dir for StateDirectory= to the one
for ConfigurationDirectory= when runnin in --user mode. With this change
we'll make separate. This brings us various benefits, such as proper
"systemctl clean" support, where we can clear service state separately
from service configuration, now in user mode too.
This does not come without complications: retaining compatibility with
older setups is difficult, because we cannot possibly identitfy which
files in existing populated config dirs are actually "state" and which
one are true" configuration.
Hence let's deal with this pragmatically: if we detect that a service
that has both dirs configured only has the configuration dir existing,
then symlink the state dir to the configuration dir to retain
compatibility.
This is not great, but it's the only somewhat reasonable way out I can
see.
Fixes: #25739
Diffstat (limited to 'man/systemd.exec.xml')
-rw-r--r-- | man/systemd.exec.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 4752e0e0f3..32128d4fab 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1378,7 +1378,7 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting> <row> <entry><varname>StateDirectory=</varname></entry> <entry><filename>/var/lib/</filename></entry> - <entry><varname>$XDG_CONFIG_HOME</varname></entry> + <entry><varname>$XDG_STATE_HOME</varname></entry> <entry><varname>$STATE_DIRECTORY</varname></entry> </row> <row> @@ -1390,7 +1390,7 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting> <row> <entry><varname>LogsDirectory=</varname></entry> <entry><filename>/var/log/</filename></entry> - <entry><varname>$XDG_CONFIG_HOME</varname><filename>/log/</filename></entry> + <entry><varname>$XDG_STATE_HOME</varname><filename>/log/</filename></entry> <entry><varname>$LOGS_DIRECTORY</varname></entry> </row> <row> |