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

Re: Service stopping in prerm considered harmful



Russ Allbery schrieb am Sunday, den 23. March 2008:

> Alexander Wirt <formorer@debian.org> writes:
> 
> > There is a small trick with dh_installinit that can be used. dh_installinit
> > supports an errorhandler. If called like: 
> >
> > dh_installinit -i --error-handler=init_failed --init-script=amavis -- defaults 19 21
> >
> > it generates the following debhelper code for prerm and postinst:
> > ...
> > invoke-rc.d amavis stop || init_failed 
> >
> > All you need then is a small function like in your postinst: 
> 
> But if you can modify the postinst, you could just fix the init script....
> (Although you may still need this for a transition.)
True, but this does not only apply to stopping the initscript but also to
package installations that stop because the daemon is unconfigured or if
something has to be changed in the configs for a new version. I find it
really annoying if a daemon that can't be started stops my installation
process. 

Alex
 


Reply to: