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

Disabling scripts in init.d *permanently*? apt-get dist-upgrade re-enables them! (did RTFM about update-rc.d)



Using Nessus as an example, I know how to disable it from starting
automatically with:
# update-rc.d -f nessusd remove

But then, two weeks down the road, a new version of nessus comes along,
and after a dist-upgrade, the service is started automatically again,
because the nessus package calls update-rc.d to have the nessusd daemon start (as it should, I guess).

How do I configure a service to *NEVER EVER START* automatically? So
this choice survives a "apt-get dist-upgrade"?

And I don't want to remove Nessus, because I *sometimes* need it. In
that case, I'll start it myself. But I don't want it to start
automatically!!!

I've noticed that if I do:
# dpkg-divert --rename \
  --divert /etc/init.d/nessusd \
  /etc/init.d/nessusd.disabled
# update-rc.d nessusd remove
I sortof achieve what I want (doesn't start automatically even after
upgrades), but after upgrading once, I get two files under /etc/init.d:
ls -l /etc/init.d/nessusd.disabled*
-rwxr-xr-x  1 root root 2199 2005-06-10 00:47 /etc/init.d/nessusd.disabled
-rwxr-xr-x  1 root root 2199 2005-11-04 13:44
/etc/init.d/nessusd.disabled.dpkg-new

The ".dpkg-new" is because it is treated as a config file (it is
mentioned in /var/lib/dpkg/info/nessusd.conffiles), and Ben Collins
<bcollins@debian.org> writes in "Re: Does dpkg-divert work on conf
files?" http://lists.debian.org/debian-devel/2000/03/msg00020.html
"You are not supposed to divert conffiles, period."

Is the dpkg-divert "workable" or "dangerous"? Is it "the best" approach? Pitfalls? Do you know an approach that is better?

Any comments? Even a "No, that can't be done. Put update-rc.d remove -d nessus in cron.daily" would be useful, or even "I've wondered that too" would make me feel less alone! ;-)

Peter
--
Peter Valdemar Mørch
http://www.morch.com



Reply to: