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

Re: use of "invoke-rc.d $PACKAGE stop || exit $?" in prerm scripts



On Tue, May 23, 2006 at 09:46:10AM +0200, Frank Küster wrote:
> Florian Weimer <fw@deneb.enyo.de> wrote:
> 
> > * Michael Prokop:
> >
> >> Using:
> >>
> >>   invoke-rc.d $PACKAGE stop || true
> >>   /etc/init.d/$PACKAGE stop || true
> >>
> >> would be a replacement already used in some packages like for
> >> example at, binfmt-support, dnsmasq, drbd0.7-utils, freeradius, hal,
> >> scanlogd, sl-modem-daemon, snort.
> >
> > I suppose it would be preferable to fix the "stop" target of the init
> > script top cope with the situation that the daemon has already been
> > terminated.  The current situation (stopping a daemon manually before
> > deinstallation makes it fail) is hardly acceptable.
> 
> I agree:  The only valid reason for a "stop" call to fail should be if
> it is actually impossible to stop a running daemon.  In this case, I
> think the package removal should indeed fail, because even if it just
> hangs completely, it might recover and then just continue to accept
> connections until the machine is rebooted.
> 

Unfortunately sometimes the daemon does not stop for an error in the
maintainer script and that prevents upgrading for ever, even when
the package has been corrected. BTW, it seems a lack in the policy
to specify how the maintainers scripts should work on stop (i.e. what
returning as exit code when stop does not work for secondary reasons)

-- 
Francesco P. Lovergine



Reply to: