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

Re: update-rc.d questions: best practice?



On Wed, 01 Mar 2006 17:57:55 +1100
Ivan Teliatnikov <ivan@geosci.usyd.edu.au> wrote:

> Hi everyone.
> 
> I am pursing a task of establishing a procedure among my colleagues -
> system administrator which will help us enable/disable services on
> Debian servers.
> 
> I am considering "update-rc.d" script that is mentioned in Debian
> documentation and was also mentioned on this list on a few occasions. 
> I have 2 questions which are not covered by either manual for
> update-rc.d or the official Debian documentation:
> 
> 1. How do I preserve a knowledge of priority level (K or S) for a
> daemon?

keep a log of your sys-admin activity.

> 
> For example:
> 
> When daemon is installed, some default priority values are setup.
> 
> e.g. for "amd" both K and S value are equal to 35.
>   Removing any system startup links for /etc/init.d/am-utils ...
>    /etc/rc0.d/K35am-utils
>    /etc/rc3.d/S35am-utils
> 
> or for "nfs-kernel-server" K=80 and S=20.
> /etc/rc5.d/S20nfs-kernel-server
> /etc/rc6.d/K80nfs-kernel-server
> 
> Let assume that I disable nfs-kernel-server by setting up K=80 for all
> run levels. How I am suppose to know that value of S should be equal to
> 20, 3 months later when I decide that I need this service. I have seen
> in the past a formula K=100-S, but it obviously does not apply
> universally to all daemons ( in case of AMD S=K=35).

There are default values for all the services. If you just

update-rc.d <service> defaults 

then it will install the symlinks to their default values automatically. If you have changed them, you probably need to 

update-rc.d [-f] <service> remove 

where -f forces removal. update-rc.d will notify you if you need to use it.

then do the defaults update again and you should be back where you started.

If you are setting up a custom configuration where services start and stop in a non-default order, then the best I can recommend is to use the ol' paper and pencil to keep notes. There may be a way to set what it considers "defaults", but I leave that to you to research. Also, if you do find a way to change the "Defaults" it may not stick around after a package upgrade.

> 
> I can purge and re-install and the package, but I do not to loose all
> configuration settings.

totally unnecessary.

A

> 
> For example 
> 
> 2. Is there a command/tool to display status of all services in all
> runlevels. I recall that such tool existed in RedHat 8.0 
> 
> /sbin/chkconfig --list 
> 
> if I am not mistaken.
> 
> -- 
> Ivan Teliatnikov
> F09 Madsen Bld.
> School of Geosciences,
> University of Sydney
> phone:  +612 9351 2031 
> mobile: +614 02 173 179
> fax:    +612 9351 3644
> e-mail:ivan@geosci.usyd.edu.au
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

Attachment: pgpChNmO_gl_P.pgp
Description: PGP signature


Reply to: