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
# 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
I've noticed that if I do:
# dpkg-divert --rename \
--divert /etc/init.d/nessusd \
# 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
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
<email@example.com> writes in "Re: Does dpkg-divert work on conf
"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 Valdemar Mørch