]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: make testing ConditionPathExistsGlob= work
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Jul 2020 10:21:47 +0000 (12:21 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Jul 2020 12:59:18 +0000 (14:59 +0200)
Fixes: #16439
Alternative-To: #16440
src/analyze/analyze-condition.c

index d18ee9d043adaf4d3a4327cca0440c6ee6fdfbc8..52ad382637f0b2816ab23347d3b47999f5beae25 100644 (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);
+                        continue;
+                p++;
 
-                p += 1 + strspn(p + 1, WHITESPACE);
+                p += strspn(p, WHITESPACE);
 
                 return c->parser(NULL, "(stdin)", 0, NULL, 0, c->name, c->type, p, target, u);
         }