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

Re: enabling/disabling daemons



On Mon, Sep 23, 2002 at 07:09:52PM -0400, Noah L. Meyerhans wrote:

> When you install the ssh package, you are asked a debconf question "Do you
> want to run the ssh server?".  If you say no, then a file
> /etc/ssh/sshd_not_to_be_run is created.  The sshd init script checks for
> the existance of this file and does not start sshd if it exists.
> Postgresql also has this kind of functionality, but it's implemented
> completely different.  
> 
> These packages use this mechanism to disable the service completely,
> regardless of what's in /etc/rc?.d.  This works around the bug that causes
> services to be started upon upgrade even if no /etc/rc?.d/S* links exist
> at all.  (Maybe the bug really is that /etc/init.d/foo restart will start
> the package if it wasn't previously running.)
>
> I want to create a standard way to say 'this service should not be
> started'.  I don't want to change the way the init system works at all; it
> works fine.  I'm sick of installing a package and removing all the start
> links from /etc/rc?.d/, only to see the package get automatically started
> next time I upgrade it.

This sounds like the problem that invoke-rc.d was created to fix.  If you
just remove the "start" links (or, presumably, configure /etc/runlevel.conf
appropriately), then the daemon will never be started.  This is
straightforward, and works the same way as the rest of the init system
without requiring any additional infrastructure.

-- 
 - mdz



Reply to: