summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-15 15:25:05 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-15 16:01:22 +0100
commit0f67f1efae74e6d129338f1b63ede902b3d7e5ae (patch)
treeccc2a1b9e25682ec3ec9e97f6b736f66ac2a352f /src/core
parent7e1a84f55244ca78093b1dabc58683bc0e7f4304 (diff)
core: lift restriction on order of - and @ in ExecStart
Diffstat (limited to 'src/core')
-rw-r--r--src/core/load-fragment.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 4dc5c529a2..b99e70e05a 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -438,6 +438,7 @@ int config_parse_exec(
e += ltype;
for (;;) {
+ int i;
char *w;
size_t l;
char *state;
@@ -452,18 +453,21 @@ int config_parse_exec(
if (rvalue[0] == 0)
break;
- if (rvalue[0] == '-') {
- ignore = true;
- rvalue ++;
- }
+ for (i = 0; i < 2; i++) {
+ if (rvalue[0] == '-' && !ignore) {
+ ignore = true;
+ rvalue ++;
+ }
- if (rvalue[0] == '@') {
- honour_argv0 = true;
- rvalue ++;
+ if (rvalue[0] == '@' && !honour_argv0) {
+ honour_argv0 = true;
+ rvalue ++;
+ }
}
if (*rvalue != '/') {
- log_error("[%s:%u] Invalid executable path in command line, ignoring: %s", filename, line, rvalue);
+ log_error("[%s:%u] Executable path is not absolute, ignoring: %s",
+ filename, line, rvalue);
return 0;
}