mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
Merge pull request #8530 from poettering/include-is-obsolete
actively say that .include is obsolete
This commit is contained in:
commit
fbbffb8c09
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user