[lug] debian and sysV init scripts

Hugh Brown hugh at math.byu.edu
Wed Mar 30 00:54:27 MST 2005


On Tue, 2005-03-29 at 22:37 -0700, Paul E Condon wrote:
> On Tue, Mar 29, 2005 at 07:29:55PM -0600, Hugh Brown wrote:
> > On RedHat I've grown accustomed to chkconfig --del <daemon> to remove
> > the links in the various run levels while leaving
> > the /etc/init.d/<daemon> script.   I do this when I've installed a
> > package that I want to be able to start by hand and play with at various
> > times but that I don't want running by default.
> > 
> > I've tried to get update-rc.d to play nice, but it refuses to do
> > anything to the run level links when they  already exist.  According to
> > the man page for update-rc.d, this is by design.  Is there another tool
> > to allow the manipulation of the links all at once or do I need to just
> > accept that on debian I'll need to use rm and ln to customize run level
> > startup once a package is installed?
> > 
> > Hugh
> > 
> 
> Debian doesn't pay much attention to run levels. Normal use of a Debian
> system involves only run level 2 for both console-only and Xwindows.
> Run levels have been left available to local use. So, why do you need
> to change symlinks of all run levels on a Debian system? You shouldn't
> need to unless you have done something that is quite outside the Debian
> tradition.
> 
> In a standard Debian system, there is only the run level 2 symlink needing
> update when you want to enable/disable a deamon. When this is needed as
> part of some fix of a problem, the advice on debian-user is usually to
> just edit the symlink. E.g. make it a real file that is empty. When you
> want to use the deamon, use the command 
> /etc/init.d/<deamon> start
> 
> When you tire of it, use
> /etc/init.d/<daemon> stop
> 
> (as root of course)
> 
> I think your file will not be overwritten by subsequent upgrades of the
> package that installed the original. 
> 
> When (if) you want to start using the deamon as intended by the
> packager, recreate the symlink in run level 2. 
> 
> But maybe I misunderstand what you want to accomplish.
> 

Nope, you understood.  I think I had forgotten that all we were really
talking about was run level 2 (that and some redhat habits die hard,
esp. when I have to use it at work).

Thanks to all for input.

Hugh

-- 
Hugh Brown <hugh at math.byu.edu>




More information about the LUG mailing list