[GLLUG] Debian, Daemon installed, but not running
Dpk
dpk@egr.msu.edu
Thu, 31 Oct 2002 17:20:25 -0500
On Thu, Oct 31, 2002 at 03:09:09PM -0500, Brian Hoort wrote:
That's Great. Thanks!
If you have time: What exactly is it doing? If the link is still in
rc*, then it will run, won't it?
The command "init" is the process that spawns the startup and shutdown
of programs. Packages install their init script in /etc/init.d. The
/etc/rc*.d directories specify the different states that the system
can be in... the states and the numbers are explained in the manpage
for init.
Symbolic links to it are made in the run level directories,
/etc/rc*.d, using update-rc.d by the package's post install script.
This is why the links get re-added when you upgrade the package
(because the new post install script is executed). Scripts in the run
level directories start with either a S or a K to indicate the start
or stop argument to the /etc/init.d script. So init would execute
"/etc/init.d/apache stop" when it occured K20apache (it actually
executes the link, i.e. "/etc/rc1.d/K20apache stop")
The command "update-rc.d -f [package (daemon name usually)] remove"
will remove the links in the rc.* directories, effectively removing it
from the startup and shutdown of the system. The script will still
exist in /etc/init.d for manual execution, but the links are gone.
/var/lib/dpkg/info has the post install script for each package. So,
say I removed apache from the run levels:
# update-rc.d -f apache remove
I could return to the package's setup by checking the post install
script:
# grep update-rc.d /var/lib/dpkg/info/apache.postinst
update-rc.d apache defaults 91 20 > /dev/null
Grep will return the command executed during installation, just cut
and paste:
# update-rc.d apache defaults 91 20
Hope this helps.
Dennis