summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-23 15:13:02 +0100
committerGitHub <noreply@github.com>2018-03-23 15:13:02 +0100
commitfbbffb8c0943f7163fe66d25820cf3060dd023b0 (patch)
tree710b283e9dd1dd789b2d8a7a90755ea47040ceec /src
parentf01eca96d0fb93a4353ae4c95ebfde7bdf657711 (diff)
parentbdc8e623bb59dbe26179e2cd46d6c2c1915bb5b8 (diff)
downloadsystemd-fbbffb8c0943f7163fe66d25820cf3060dd023b0.tar.gz
Merge pull request #8530 from poettering/include-is-obsolete
actively say that .include is obsolete
Diffstat (limited to 'src')
-rw-r--r--src/shared/conf-parser.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 72c47150d0..483dc1a69f 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -180,7 +180,7 @@ static int parse_line(
char *l,
void *userdata) {
- char *e;
+ char *e, *include;
assert(filename);
assert(line > 0);
@@ -194,7 +194,8 @@ static int parse_line(
if (strchr(COMMENTS "\n", *l))
return 0;
- if (startswith(l, ".include ")) {
+ include = first_word(l, ".include");
+ if (include) {
_cleanup_free_ char *fn = NULL;
/* .includes are a bad idea, we only support them here
@@ -211,7 +212,11 @@ static int parse_line(
return 0;
}
- fn = file_in_same_dir(filename, strstrip(l+9));
+ log_syntax(unit, LOG_WARNING, filename, line, 0,
+ ".include directives are deprecated, and support for them will be removed in a future version of systemd. "
+ "Please use drop-in files instead.");
+
+ fn = file_in_same_dir(filename, strstrip(include));
if (!fn)
return -ENOMEM;