summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-21 18:57:15 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-21 19:22:24 +0100
commitb8e7a47baf10683f59bf848abd300b45cd5042f2 (patch)
treeafad7ba94057a25522683868aec4a42baae7e10f
parent0183b74fa47d7f05b7bc3b46d82daf8cebb17fa7 (diff)
man: don't document ".include" in configuration files anymore as first step to deprecate them one day
-rw-r--r--man/systemd.unit.xml6
-rw-r--r--src/shared/conf-parser.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 2b59b1b841..4445c74101 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -200,12 +200,6 @@
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
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index d5a639e874..dde62b5755 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -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.");