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

calling `update-rc.d remove' on remove?



Policy 3.4.3:
     To get the default behaviour for your package, put in your `postinst'
     script 
             update-rc.d <package> default >/dev/null
     and in your `postrm' 
             if [ purge = "$1" ]; then
                 update-rc.d <package> remove >/dev/null
             fi

I found a case where it might be good to call update-rc.s on both
purge and remove. LPRng is an alternative to lpd:

>From http://www.debian.org/Bugs/db/84/8416.html :
> > lprng conflicts with lpr. After removing lpr there is still the init.d
> > script of lpr (conffile) around. So after booting both scripts are
> > starting the lpd. lprng should take care of this situation by either
> > informing the user to do something or by taking some action in the
> > postinst.
(Me:)
>
> lprng conflicts with lpr, so lpr gets removed when lprng is installed.
>
> But removing lpr means:
> - /etc/init.d/lpd remains
> - `update-rc.d lpd remove >/dev/null' is not run
>
> IMHO this should be changed in such cases:
> - run `update-rc.d -f lpd remove >/dev/null' on remove and purge
>
> (-f means that update-rc.d runs even when /etc/init.d/lpd exists)

What do you think about this case?

Does anyone remember why the policy doesn't require `update-rc.d
remove' when the package is being removed?

	Sven
-- 
Sven Rudolph <sr1@inf.tu-dresden.de>
http://www.sax.de/~sr1/


Reply to: