analyze: make testing ConditionPathExistsGlob= work

Fixes: #16439
Alternative-To: #16440
This commit is contained in:
Lennart Poettering 2020-07-14 12:21:47 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 4519c7c706
commit 08ef688656
1 changed files with 7 additions and 4 deletions

View File

@ -85,11 +85,14 @@ static int parse_condition(Unit *u, const char *line) {
p = startswith(line, c->name);
if (!p)
continue;
p += strspn(p, WHITESPACE);
if (*p != '=')
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Expected \"=\" in \"%s\".", line);
p += 1 + strspn(p + 1, WHITESPACE);
p += strspn(p, WHITESPACE);
if (*p != '=')
continue;
p++;
p += strspn(p, WHITESPACE);
return c->parser(NULL, "(stdin)", 0, NULL, 0, c->name, c->type, p, target, u);
}