[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#60979: What /etc/init.d/xxx restart does?



On Thu, 12 Sep 2002, Oliver Elphick wrote:
> On Thu, 2002-09-12 at 18:43, Robert Bihlmeyer wrote:
> > Starting and stopping a service should be idempotent, i.e. further
> > attempts should silently succeed. 
> 
> I don't agree with that, if that is what current policy says (but I
> don't think it does).

Tough look.  That's how it has been standardized in the LSB, that's how it
is in Debian policy already (if not well written, but still)...

If you need to know what the state of a service is, the right way to go
about it is to implement the "status" initscript action.

> If I start something that is already started, I want it to tell me -

It can tell you, but the exit status is 0.

> maybe I was starting the wrong thing; maybe I failed to stop it when I
> thought I had stoppped it.

If something fails to stop, it cannot exit with status 0.

> If something is already started, the script should say "xxx is already
> running".  If it is already stopped, the script should say "xxx is not
> running".

It can say that, we mandate the exit status.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: