1 |
commit: fb8db18d79b4efc65c2b04a66a8e9e3b56f21f00 |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 31 01:41:59 2011 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 31 01:41:59 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=fb8db18d |
7 |
|
8 |
Add "retry" option for the stop() template |
9 |
|
10 |
--- |
11 |
man/runscript.8 | 5 ++++- |
12 |
sh/runscript.sh.in | 1 + |
13 |
2 files changed, 5 insertions(+), 1 deletions(-) |
14 |
|
15 |
diff --git a/man/runscript.8 b/man/runscript.8 |
16 |
index 9439b76..77b2399 100644 |
17 |
--- a/man/runscript.8 |
18 |
+++ b/man/runscript.8 |
19 |
@@ -21,7 +21,7 @@ |
20 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
21 |
.\" SUCH DAMAGE. |
22 |
.\" |
23 |
-.Dd November 4, 2009 |
24 |
+.Dd December 31, 2011 |
25 |
.Dt RUNSCRIPT 8 SMM |
26 |
.Os OpenRC |
27 |
.Sh NAME |
28 |
@@ -112,6 +112,9 @@ List of arguments to pass to the daemon when starting. |
29 |
Pidfile to use for the above defined command. |
30 |
.It Ar name |
31 |
Display name used for the above defined command. |
32 |
+.It Ar retry |
33 |
+You can either specify a timeout in seconds or a multiple signal/timeout pairs |
34 |
+as a stopping schedule. This is only used during stop(). |
35 |
.El |
36 |
.Sh DEPENDENCIES |
37 |
You should define a |
38 |
|
39 |
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in |
40 |
index b738b89..470f04c 100644 |
41 |
--- a/sh/runscript.sh.in |
42 |
+++ b/sh/runscript.sh.in |
43 |
@@ -151,6 +151,7 @@ stop() |
44 |
[ -n "$command" -o -n "$procname" -o -n "$pidfile" ] || return 0 |
45 |
ebegin "Stopping ${name:-$RC_SVCNAME}" |
46 |
start-stop-daemon --stop \ |
47 |
+ ${retry:+--retry} $retry \ |
48 |
${command:+--exec} $command \ |
49 |
${procname:+--name} $procname \ |
50 |
${pidfile:+--pidfile} $pidfile \ |