From b2f8ac9382d5dad70181ef803a37f43896f5cb91 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 13 Aug 2013 12:12:43 -0500 Subject: [PATCH] Clarify the documentation about the restart function Restart has never been able to be overridden in OpenRc, but there is a way to make your service script behave differently when restart is being executed. X-Gentoo-Bug: 480866 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=480866 --- man/runscript.8 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/man/runscript.8 b/man/runscript.8 index 72775465..ddce662c 100644 --- a/man/runscript.8 +++ b/man/runscript.8 @@ -60,7 +60,10 @@ First we ensure that any services that depend on us are stopped. If any services that need us fail to stop then we exit with a suitable error, otherwise call the supplied stop function if it exists. .It Ar restart -Stop and start the service, including dependencies. +Stop and start the service, including dependencies. This cannot be +overridden. See the description of the RC_CMD variable below for the +method to make your service behave differently when restart is being +executed. .It Ar status Show the status of the service. The return code matches the status, with the exception of "started" returning 0 to match standard command behaviour. @@ -362,7 +365,8 @@ offset. Otherwise it is undefined. The result of `uname -s`. .It Va RC_CMD This contains the name of the command the service script is executing, such -as start, stop, restart etc. +as start, stop, restart etc. One example of using this is to make a +service script behave differently when restart is being executed. .El .Sh FILES .Pp