I'm trying to figure out what command is used in Debian to
enable/disable init.d services at various runlevels.  Something
equivalient to the old SGI utility "chkconfig" that has been
adopted by RedHat.  Everytime this question is asked, the
answer given is "update-rc.d". But, AFAICT, update-rc.d doesn't
do what chkconfig does.

According to the man page, update-rc.d can't be used to modify
an existing configuration:

  When run with either the defaults, start, or stop options,
  update-rc.d makes links /etc/rcrunlevel.d/[SK]NNname pointing
  to the script /etc/init.d/name,

  If any files /etc/rcrunlevel.d/[SK]??name already exist then
  update-rc.d does nothing.  This is so that the system
  administrator can rearrange the links, provided that they
  leave at least one link remaining, without having their
  configuration overwritten.

The whole point of chkconfig is to provide a tool that can be
used to modify the init.d configuration.  update-rc.d
explicitly disallows this.  

I suppose one could remove all of the links, the add them back
in as desired, but that requires that you know the current
configuration when all you want to do is enable/disable a
service for runlevel X.

Why not allow update-rc.d to modify the current configuration
when the -f flag is used?

Anohter question: where do the defaults come from?  For
wu-ftpd:

   /etc/rc0.d/K20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc1.d/K20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc6.d/K20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc2.d/S20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc3.d/S20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc4.d/S20wu-ftpd -> ../init.d/wu-ftpd
   /etc/rc5.d/S20wu-ftpd -> ../init.d/wu-ftpd

On non-Debian systems, one generally kills things in the
reverse order one starts them.  So if you use S20 you do K80
(and vice versa).  Using S20 and K20 seems wrong.

Why not just adopt chkconfig?

-- 
Grant Edwards
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


Reply via email to