[lug] debian and sysV init scripts
Paul E Condon
pecondon at mesanetworks.net
Tue Mar 29 22:37:09 MST 2005
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.
--
Paul E Condon
pecondon at mesanetworks.net
More information about the LUG
mailing list