summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2012-08-07 14:41:48 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-08-08 18:11:09 +0200
commitd568a3350ee8a45877eef87cd026a954124e2cf8 (patch)
tree067004e51637638797966799237a8135202474a4 /src/core/load-fragment.c
parent7781e063e8e9d3e92e4e158e1588b885808cda24 (diff)
systemd: introduced new timeout types
Makes possible to specify separate timeout for start and stop of the service. [ Improved the manpage. Coding style fix. -- michich ]
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index bbd82b9d24..10681307cf 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1376,10 +1376,16 @@ int config_parse_service_timeout(
r = config_parse_usec(filename, line, section, lvalue, ltype, rvalue, data, userdata);
- if (!r)
- s->timeout_defined = true;
+ if (r)
+ return r;
- return r;
+ if (streq(lvalue, "TimeoutSec")) {
+ s->start_timeout_defined = true;
+ s->timeout_stop_usec = s->timeout_start_usec;
+ } else if (streq(lvalue, "TimeoutStartSec"))
+ s->start_timeout_defined = true;
+
+ return 0;
}
int config_parse_unit_env_file(