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

Re: Bug#3215: `update-rc.d remove' doesn't remove /etc/init.d script

Rob Leslie writes ("Bug#3215: `update-rc.d remove' doesn't remove /etc/init.d script"):
>          When invoked with the remove option,  update-rc.d  removes
>          the  script and links to the script for the package <base-
>          name>.   It  first  finds  and  removes  the   script   in
>          /etc/init.d/  and  then removes all links to the script in
>          /etc/rc[0123456].d/.
> But:
>   deimos:proj/debian/sendmail:[11]# update-rc.d sendmail remove
>   update-rc.d: error: /etc/init.d/sendmail exists during rc.d purge.
>   zsh: 1034 exit 1     update-rc.d sendmail remove
> I wanted to use `update-rc.d sendmail remove' from sendmail's preinst, since
> calling `update-rc.d sendmail defaults' won't renumber the links if they are
> already present in the /etc/rc?.d directories. Do I need to remove the script
> >from  /etc/init.d first myself, or shouldn't update-rc.d handle it?

This is a documentation bug.  update-rc.d requires you to remove the
script before calling it.  In the usual case (update-rc.d remove
called from postinst purge) dpkg will have removed the script already
because it's a conffile.

If you want to renumber links you shouldn't purge and reinstall the
links, you should renumber them.  This is so that you won't change
things if the sysadmin has (for example) changed which runlevels have
sendmail running.

I've edited the manpage to fix this; the change will be in 1.2.4.  I
may revise the manpage completely - it looks pretty ropey at the

I'll close the bug report.


Reply to: