From: Yu Watanabe Date: Wed, 20 Jun 2018 18:20:34 +0000 (+0900) Subject: core: add unit specifier for configuration directory root X-Git-Tag: v239~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=969309c2b424f888b7d118e6ae66d4d3f009d91f;p=thirdparty%2Fsystemd.git core: add unit specifier for configuration directory root Follow-up for 14068e17f32a06e6a1f8f72416018bc653b8ea2d. --- diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 673f5575dbc..92c0f6297a9 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 92896d90be6..046e937e92a 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 },