Re: Service stopping in prerm considered harmful
On Tue, 25 Mar 2008, Gunnar Wolf wrote:
> Henrique de Moraes Holschuh dijo [Mon, Mar 24, 2008 at 07:44:02PM -0300]:
> > > >> For the nth time, I have a package that dpkg is unable to remove because
> > > >> it tries to stop a service that either is already stopped (I didn't want
> > >
> > > > For the nth time squared, an initscript MUST NOT FAIL to stop an already
> > > > stopped service.
> > >
> > > How is it supposed to do that? The service isn't running, so can't be
> > > stopped, therefore the script (if called to stop it) can only fail to stop
> > > it...
> > >
> > > ITYM "must not fail if the service is already stopped".
> > Well, whatever suits your fancy that results in a return status of 0
> > should the script return with the service stopped (regardless of the
> > script needing to do something or not to archieve that stopped status)
> > :-)
> Umh... Well, if the init script detects the service is still running
> after it tried to stop it, _then_ it can return failure
"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