[lsb-discuss] LSB initscripts: try-restart

Tobias Burnus tobias.burnus at physik.fu-berlin.de
Fri Aug 8 10:02:02 PDT 2003


Hello,

On Thu, 31 Jul 2003, Tobias Burnus wrote:
> Thorsten Kukuk <kukuk at suse.de> wrote Tue, 29 Jul 2003:
> > what should be the return values for try-restart? This is one point
> > which leaves the current spec open.
> > I think if the service is running, try-restart should return the
> > same error codes as restart,
Right. But with exception of the "i.e." list this was already in the spec,
wasn't it?

> > but what is if the service is not running?
> Hmm, good question. RedHat's 'condrestart' usually does:
>   [some running test ] && restart || :
> and SuSE's try-restart currently (taken from /etc/init.d/skeleton):
>   $0 status >/dev/null &&  $0 restart

SuSE will now return a 0 (Success) in case no program is running. Since
returning a zero is in the spirit of the gLSB and since SuSE/UL and RedHat
(will) have the same return code, this patch adds

- running "try-restart" on a service already stopped or not running

to the situations that are also to be considered successful.

Please apply this patch and run 'make' in the sysinit directory.

Tobias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: initactions.diff
Url: http://lists.linux-foundation.org/pipermail/lsb-discuss/attachments/20030808/55af90ac/attachment.txt 


More information about the lsb-discuss mailing list