Re: force-reload/restart
Tobias Burnus <[email protected]>
| Newsgroups | gmane.linux.lsb.discuss |
|---|---|
| Message-ID | <[email protected]> |
Hello, On Tue, 12 Aug 2003, Tobias Burnus wrote: > > The result is: If a service supports SIGHUP and is not running, a > > "force-reload" will give you an error. If a service does not support > > SIGHUP, a "force-reload" will start the service, if it is not running > > before. > > So I suggest do change "force-reload" to: > > "cause the configuration to be reloaded if the service supports this, > > otherwise restart the service if it is running". > Questions: > - Is the exit status code clear for force-reload if the service is not > running? Given the discussion concerning "try-restart" it might not be > the case. The attached patch adds > "- running "reload" on a service already stopped or not running", > "- running "force-reload" on a service already stopped or not running" > to the list of actions which shall be considered successful. After looking at several init scripts (RedHat, SuSE, Debian) and some [minor] discussion I tend to go back to the previous behaviour: Return a not-running 7 and not a sucess 0. (Otherwise the not-running 7 doesn't make any sense and providing more details rather than less is not so bad either.) --- initactions.sgml 12 Aug 2003 21:31:28 -0000 1.10 +++ initactions.sgml 14 Aug 2003 14:41:29 -0000 @@ -93,6 +92,0 @@ -<LISTITEM><PARA> -running "reload" on a service already stopped or not running -</PARA></LISTITEM> -<LISTITEM><PARA> -running "force-reload" on a service already stopped or not running -</PARA></LISTITEM> What are the opinions of the others? Tobias