chiark / gitweb /
man: don't document ".include" in configuration files anymore as first step to deprec...
authorLennart Poettering <lennart@poettering.net>
Fri, 21 Feb 2014 17:57:15 +0000 (18:57 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Feb 2014 18:22:24 +0000 (19:22 +0100)
man/systemd.unit.xml
src/shared/conf-parser.c

index 2b59b1b841c64b3c2c5d9d870c68ef12b5ea73e8..4445c74101a0cc2a67578f197bb4786e5ffa29b2 100644 (file)
                 has the appropriate section headers before any
                 directive.</para>
 
-                <para>If a line starts with <option>.include</option>
-                followed by a filename, the specified file will be
-                parsed at this point. Make sure that the file that is
-                included has the appropriate section headers before
-                any directives.</para>
-
                 <para>Note that while systemd offers a flexible
                 dependency system between units it is recommended to
                 use this functionality only sparingly and instead rely
index d5a639e874a3138bfe040977f1e7fa46a1da905c..dde62b575501d66c04e2880b01e8058a34b79278 100644 (file)
@@ -225,6 +225,15 @@ static int parse_line(const char* unit,
         if (startswith(l, ".include ")) {
                 _cleanup_free_ char *fn = NULL;
 
+                /* .includes are a bad idea, we only support them here
+                 * for historical reasons. They create cyclic include
+                 * problems and make it difficult to detect
+                 * configuration file changes with an easy
+                 * stat(). Better approaches, such as .d/ drop-in
+                 * snippets exist.
+                 *
+                 * Support for them should be eventually removed. */
+
                 if (!allow_include) {
                         log_syntax(unit, LOG_ERR, filename, line, EBADMSG,
                                    ".include not allowed here. Ignoring.");