46 lines
2.3 KiB
Diff
46 lines
2.3 KiB
Diff
From 3cd561fcf1d419fd6484ae831bced6c842453e6f Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Sun, 2 Nov 2014 19:08:06 -0500
|
|
Subject: [PATCH] Accept StartTimeout* options for compatibility
|
|
|
|
Assignments of 0/none are ignored, all others are warned about.
|
|
---
|
|
src/core/main.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/core/main.c b/src/core/main.c
|
|
index d48604e673..a9ca34d8cb 100644
|
|
--- a/src/core/main.c
|
|
+++ b/src/core/main.c
|
|
@@ -623,6 +623,9 @@ static int config_parse_join_controllers(const char *unit,
|
|
}
|
|
|
|
static int parse_config_file(void) {
|
|
+ usec_t start_timeout_usec = 0;
|
|
+ FailureAction start_timeout_action = FAILURE_ACTION_NONE;
|
|
+ char *start_timeout_reboot_arg = NULL;
|
|
|
|
const ConfigTableItem items[] = {
|
|
{ "Manager", "LogLevel", config_parse_level2, 0, NULL },
|
|
@@ -670,6 +673,9 @@ static int parse_config_file(void) {
|
|
{ "Manager", "DefaultCPUAccounting", config_parse_bool, 0, &arg_default_cpu_accounting },
|
|
{ "Manager", "DefaultBlockIOAccounting", config_parse_bool, 0, &arg_default_blockio_accounting },
|
|
{ "Manager", "DefaultMemoryAccounting", config_parse_bool, 0, &arg_default_memory_accounting },
|
|
+ { "Manager", "StartTimeoutSec", config_parse_sec, 0, &start_timeout_usec },
|
|
+ { "Manager", "StartTimeoutAction", config_parse_failure_action, 0, &start_timeout_action },
|
|
+ { "Manager", "StartTimeoutRebootArgument",config_parse_string, 0, &start_timeout_reboot_arg },
|
|
{}
|
|
};
|
|
|
|
@@ -681,6 +687,10 @@ static int parse_config_file(void) {
|
|
config_item_table_lookup, items,
|
|
false, false, true, NULL);
|
|
|
|
+ if (start_timeout_usec != 0 || start_timeout_action != FAILURE_ACTION_NONE)
|
|
+ log_warning("StartTimeoutSec, StartTimeoutAction, StartTimeoutRebootArgument settings have\n"
|
|
+ "been replaced by JobTimeoutSec, JobTimeoutAction, JobTimeoutReboot, ignoring.");
|
|
+
|
|
return 0;
|
|
}
|
|
|