tmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too

This commit is contained in:
Lennart Poettering 2023-06-27 13:14:17 +02:00
parent cc8fdd5d30
commit b50aadaff2
2 changed files with 4 additions and 4 deletions

View file

@ -736,7 +736,7 @@ d /tmp/foo/bar - - - bmA:1h -</programlisting></para>
<row>
<entry><literal>%L</literal></entry>
<entry>System or user log directory</entry>
<entry>In <option>--user</option> mode, this is the same as <varname>$XDG_CONFIG_HOME</varname> with <filename index="false">/log</filename> appended, and <filename>/var/log</filename> otherwise.</entry>
<entry>In <option>--user</option> mode, this is the same as <varname>$XDG_STATE_HOME</varname> with <filename index="false">/log</filename> appended, and <filename>/var/log</filename> otherwise.</entry>
</row>
<xi:include href="standard-specifiers.xml" xpointer="m"/>
<xi:include href="standard-specifiers.xml" xpointer="M"/>
@ -744,7 +744,7 @@ d /tmp/foo/bar - - - bmA:1h -</programlisting></para>
<row>
<entry><literal>%S</literal></entry>
<entry>System or user state directory</entry>
<entry>In <option>--user</option> mode, this is the same as <varname>$XDG_CONFIG_HOME</varname>, and <filename>/var/lib</filename> otherwise.</entry>
<entry>In <option>--user</option> mode, this is the same as <varname>$XDG_STATE_HOME</varname>, and <filename>/var/lib</filename> otherwise.</entry>
</row>
<row>
<entry><literal>%t</literal></entry>

View file

@ -255,9 +255,9 @@ static int specifier_directory(char specifier, const void *data, const char *roo
static const struct table_entry paths_user[] = {
[DIRECTORY_RUNTIME] = { SD_PATH_USER_RUNTIME },
[DIRECTORY_STATE] = { SD_PATH_USER_CONFIGURATION },
[DIRECTORY_STATE] = { SD_PATH_USER_STATE_PRIVATE },
[DIRECTORY_CACHE] = { SD_PATH_USER_STATE_CACHE },
[DIRECTORY_LOGS] = { SD_PATH_USER_CONFIGURATION, "log" },
[DIRECTORY_LOGS] = { SD_PATH_USER_STATE_PRIVATE, "log" },
};
const struct table_entry *paths;