summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-08 02:49:44 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-08 02:49:44 +0200
commitf34277d9117cd9d858f7332eef0023e05277ce74 (patch)
treeb8fa5b715ca20d4d4f78515c6f7356236c1598e1
parent40b8a33210fcfb28e7e8b775e265e249583d81ec (diff)
service: increase default timeout for sysv scripts to 3min
For SysV services we cannot set the timeout inside the configuration file. Hence let's pick a large timeout by default. https://bugzilla.redhat.com/show_bug.cgi?id=635393
-rw-r--r--src/service.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 116e539d95..195f04a315 100644
--- a/src/service.c
+++ b/src/service.c
@@ -39,6 +39,9 @@
#define NEWLINES "\n\r"
#ifdef HAVE_SYSV_COMPAT
+
+#define DEFAULT_SYSV_TIMEOUT_USEC (3*USEC_PER_MINUTE)
+
typedef enum RunlevelType {
RUNLEVEL_UP,
RUNLEVEL_DOWN,
@@ -790,7 +793,8 @@ static int service_load_sysv_path(Service *s, const char *path) {
/* Don't timeout special services during boot (like fsck) */
s->timeout_usec = 0;
- }
+ } else
+ s->timeout_usec = DEFAULT_SYSV_TIMEOUT_USEC;
/* Special setting for all SysV services */
s->type = SERVICE_FORKING;