summaryrefslogtreecommitdiff
path: root/src/sysv-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-31 03:28:37 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-31 08:56:03 -0400
commitb2fadec6048adb3596f2633cb7fe7a49f5937a18 (patch)
tree8969997ed3730146ff98774b14b3dcd65392c4df /src/sysv-generator
parenta2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 (diff)
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service [./trailing-g.service:2] Trailing garbage, ignoring. trailing-g.service lacks ExecStart setting. Refusing. Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument. Failed to create trailing-g.service/start: Invalid argument
Diffstat (limited to 'src/sysv-generator')
-rw-r--r--src/sysv-generator/sysv-generator.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index cfae1d75b3..368d420df3 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -494,6 +494,10 @@ static int load_sysv(SysvStub *s) {
"[%s:%u] Failed to add LSB Provides name %s, ignoring: %s",
s->path, line, m, strerror(-r));
}
+ if (!isempty(state_))
+ log_error_unit(s->name,
+ "[%s:%u] Trailing garbage in Provides, ignoring.",
+ s->path, line);
} else if (startswith_no_case(t, "Required-Start:") ||
startswith_no_case(t, "Should-Start:") ||
@@ -552,6 +556,11 @@ static int load_sysv(SysvStub *s) {
"[%s:%u] Failed to add dependency on %s, ignoring: %s",
s->path, line, m, strerror(-r));
}
+ if (!isempty(state_))
+ log_error_unit(s->name,
+ "[%s:%u] Trailing garbage in %*s, ignoring.",
+ s->path, line,
+ (int)(strchr(t, ':') - t), t);
} else if (startswith_no_case(t, "Description:")) {
char *d, *j;