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

Re: rc.boot



> Julian Gilbey writes:
> > /etc/rc.boot is deprecated.
> 
> >From debian-policy (2.5.1.0, current according to apt):
> 
>   3.3.4. Boot-time initialization
>   -------------------------------
> 
>      There is another directory, `/etc/rc.boot', which contains scripts
>      which are run once per machine boot. This facility is provided for
>      initialization of hardware devices, cleaning up of leftover files, and
>      so forth.
> 
>      For example, the `kbd' package provides a script here for initialising
>      the keyboard layout and console font and mode.
> 
>      The files in `/etc/rc.boot' should _not_ be links into
>      `/etc/init.d'--they should be the scripts themselves.
> 
>      `rc.boot' should _not_ be used for starting general-purpose daemons
>      and similar activities. This should be done using the `rc<n>.d'
>      scheme, above, so that the services can be started and stopped cleanly
>      when the runlevel changes or the machine is to be shut down or
>      rebooted.
> 
> Where is this deprecation documented?

It's currently an accepted policy amendment and will appear in the
next revision of policy.  Check out the debian-policy bug report for
details.  rc.boot(5) is also explicit on this point.

> > Install the script in /etc/init.d...
> 
>   3.3.2. Writing the scripts
>   --------------------------
> 
>      Packages can and should place scripts in `/etc/init.d' to start or
>      stop services at boot time or during a change of runlevel.
> 
> I'm not starting or stopping any services.  This script should run *only*
> at boot, not when the runlevel changes.

That's OK.  Still put the script in /etc/init.d and use something like:
postinst:  update-rc.d dns-clean start 30 S .
postrm:    update-rc.d dns-clean remove

Don't put the script itself in /etc/rcS.d: it will cause all sorts of
problems if, for example, someone changes to the single rc file
version (can't remember which package it's in).

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg


Reply to: