systemd/0001-Revert-core-device-Use-JobRunningTimeoutSec-for-devi.patch

49 lines
1.8 KiB
Diff
Raw Normal View History

From 02a4361a931a210b547795a49d062e90d2462cbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
Date: Wed, 23 Aug 2017 15:18:19 +0200
Subject: [PATCH 1/1] Revert "core/device: Use JobRunningTimeoutSec= for device
units"
This reverts commit d9732d78034cd01a75f2cda6ebaddb4c3a0929ea.
This is not backwards compatible for outer callers that are used to set
JobTimeoutSec= for devices. The compatibility breaks if JobTimeoutSec= is
longer than default JobRunningTimeoutSec=90, especially JobTimeoutSec=infinity.
[mkoutny: fixes bsc#1048605]
[fbui: as a consequence, reintroduces bsc#1004995]
---
src/core/device.c | 2 +-
src/shared/generator.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/device.c b/src/core/device.c
index 434a6a9c5..89549f43b 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -114,7 +114,7 @@ static void device_init(Unit *u) {
* indefinitely for plugged in devices, something which cannot
* happen for the other units since their operations time out
* anyway. */
- u->job_running_timeout = u->manager->default_timeout_start_usec;
+ u->job_timeout = u->manager->default_timeout_start_usec;
u->ignore_on_isolate = true;
}
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 47be354ba..743bc88f6 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -187,7 +187,7 @@ int generator_write_timeouts(
return write_drop_in_format(dir, unit, 50, "device-timeout",
"# Automatically generated by %s\n\n"
- "[Unit]\nJobRunningTimeoutSec=%s",
+ "[Unit]\nJobTimeoutSec=%s",
program_invocation_short_name, timeout);
}
--
2.13.1