commit e0921ed71bab0ad7d2344774a33c22809eb10190 set the timeout globally
authorJohn Crispin <blogic@openwrt.org>
Fri, 7 Feb 2014 13:24:10 +0000 (13:24 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 7 Feb 2014 13:26:15 +0000 (13:26 +0000)
lets restrict it to stop scripts only

Signed-off-by: John Crispin <blogic@openwrt.org>
rcS.c

diff --git a/rcS.c b/rcS.c
index 039b595c6d74d46f7ecb991adfada37318ec180f..d04e017ab269cbb5fb50cb4b3f27a29a869cdb83 100644 (file)
--- a/rcS.c
+++ b/rcS.c
@@ -115,7 +115,8 @@ static void add_initd(struct runqueue *q, char *file, char *param)
        s = calloc_a(sizeof(*s), &f, strlen(file) + 1, &p, strlen(param) + 1);
        s->proc.task.type = &initd_type;
        s->proc.task.complete = q_initd_complete;
-       s->proc.task.run_timeout = 15000;
+       if (!strcmp(param, "stop"))
+               s->proc.task.run_timeout = 15000;
        s->param = p;
        s->file = f;
        strcpy(s->param, param);