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

Re: How to prevent daemons from ever being started?



On Mon, May 15, 2006 at 05:09:28PM +0200, Uwe Hermann wrote:
> What is "the Debian way" to prevent any daemon from ever starting,
> whether upon reboot, upon upgrade, upon new install etc.
>  * /etc/init.d/foobar stop
>  * /usr/sbin/update-rc.d -f foobar remove
Hi,
this should be the right way. But there is a problem with the script
/usr/sbin/invoke-rc.d, which is looking for symlinks in runlevels.
This script is, for example, used in logrotate. Unfortunately this
script starts the deamon if no link for it exists in rcX.d. 
I changed this script inserting 
if test $# == 0 ; then
	printerror no symlink: $1
	doexit=102
fi
at line 321. 
I have not checked if this change will prevent service from starting
through apt/dselect/aptitude. 
Another way is to insert "exit 0" at the beginning of the
/etc/init.d/<servicename>. this will prevent it from starting, but will
ask you at update for updating init-script every time.

cu,
	Guido Ackermann



Reply to: