summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortblume <Thomas.Blume@suse.com>2016-04-26 17:10:36 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-26 17:10:36 +0200
commit959718c62107c11f1665f813e856a0a1d5b0bb7c (patch)
tree08dbc49f35e166a6fb19233e40a20ea663281395 /src
parenta109d2e204ae9561c4a7f7982448a6ca0d318fb3 (diff)
core: set start job timeout from the kernel commandline (#3112)
Add the boot parameter: systemd.default_timeout_start_sec to allow modification of the default start job timeout at boot time.
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 8dfb3928de..75c5ff81f2 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -413,6 +413,15 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
target = runlevel_to_target(key);
if (target)
return free_and_strdup(&arg_default_unit, target);
+
+ } else if (streq(key, "systemd.default_timeout_start_sec") && value) {
+
+ r = parse_sec(value, &arg_default_timeout_start_usec);
+ if (r < 0)
+ log_warning_errno(r, "Failed to parse default start timeout: %s, ignoring.", value);
+
+ if (arg_default_timeout_start_usec <= 0)
+ arg_default_timeout_start_usec = USEC_INFINITY;
}
return 0;