]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: add unit specifier for configuration directory root
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Jun 2018 18:20:34 +0000 (03:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Jun 2018 18:20:37 +0000 (03:20 +0900)
Follow-up for 14068e17f32a06e6a1f8f72416018bc653b8ea2d.

man/systemd.unit.xml
src/core/unit-printf.c

index 673f5575dbc1137981a6c4c4d5af55bd7f8c9816..92c0f6297a900fe5219722f398174cbd0a4101f1 100644 (file)
             <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>
index 92896d90be6cc01ff2b8ed3b68d361fb2257198f..046e937e92ad2426c6f0a9a7b676fbbfd745f0bf 100644 (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 },