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

Re: Service stopping in prerm considered harmful

On Sun, 23 Mar 2008, Pierre THIERRY wrote:
> 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.  Ever.  It must return an status of zero.  It is in
LSB.  It is in Debian policy.  And it doesn't take half a software
engineer to understand that initscripts are about "switch to state foo"
rather than "perform action foo".

This is not your problem, of course (you didn't write the script :p).
But it is the issue that is causing your problem.

File a bug against the package please.  Severity serious, section 9.3.2.
Have the output of "sh -x /etc/init.d/<script> stop" in the bug report,
it may be something else is broken, and not the fact that the service is
not active.

Meanwhile, add exit 0 to the top of the initscript, and purge the
package to get rid of the thing.  WARNING: will remove any configuration
for the package.

  "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: