diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 673f5575db..92c0f6297a 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1535,6 +1535,11 @@ Cache directory root This is either /var/cache (for the system manager) or the path $XDG_CACHE_HOME resolves to (for user managers). + + %E + Configuration directory root + This is either /etc (for the system manager) or the path $XDG_CONFIG_HOME resolves to (for user managers). + %f Unescaped filename diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c index 92896d90be..046e937e92 100644 --- a/src/core/unit-printf.c +++ b/src/core/unit-printf.c @@ -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 },