1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

core: add unit specifier for configuration directory root

Follow-up for 14068e17f3.
This commit is contained in:
Yu Watanabe 2018-06-21 03:20:34 +09:00
parent 5ce2212a72
commit 969309c2b4
2 changed files with 7 additions and 0 deletions

View File

@ -1535,6 +1535,11 @@
<entry>Cache directory root</entry>
<entry>This is either <filename>/var/cache</filename> (for the system manager) or the path <literal>$XDG_CACHE_HOME</literal> resolves to (for user managers).</entry>
</row>
<row>
<entry><literal>%E</literal></entry>
<entry>Configuration directory root</entry>
<entry>This is either <filename>/etc</filename> (for the system manager) or the path <literal>$XDG_CONFIG_HOME</literal> resolves to (for user managers).</entry>
</row>
<row>
<entry><literal>%f</literal></entry>
<entry>Unescaped filename</entry>

View File

@ -227,6 +227,7 @@ int unit_full_printf(Unit *u, const char *format, char **ret) {
* %S: the state directory root (e.g. /var/lib or $XDG_CONFIG_HOME)
* %C: the cache directory root (e.g. /var/cache or $XDG_CACHE_HOME)
* %L: the log directory root (e.g. /var/log or $XDG_CONFIG_HOME/log)
* %E: the configuration directory root (e.g. /etc or $XDG_CONFIG_HOME)
* %T: the temporary directory (e.g. /tmp, or $TMPDIR, $TEMP, $TMP)
* %V: the temporary directory for large, persistent stuff (e.g. /var/tmp, or $TMPDIR, $TEMP, $TMP)
*
@ -259,6 +260,7 @@ int unit_full_printf(Unit *u, const char *format, char **ret) {
{ 'S', specifier_special_directory, UINT_TO_PTR(EXEC_DIRECTORY_STATE) },
{ 'C', specifier_special_directory, UINT_TO_PTR(EXEC_DIRECTORY_CACHE) },
{ 'L', specifier_special_directory, UINT_TO_PTR(EXEC_DIRECTORY_LOGS) },
{ 'E', specifier_special_directory, UINT_TO_PTR(EXEC_DIRECTORY_CONFIGURATION) },
{ 'T', specifier_tmp_dir, NULL },
{ 'V', specifier_var_tmp_dir, NULL },