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

Re: Service stopping in prerm considered harmful

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.)

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: