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

Bug#941194: [PATCH 2/2] refer to external documentation for implementation details of /etc/rcn.d



Seconded.  Super-minor punctuation nit below for whoever applies this
patch.

Ansgar <ansgar@debian.org> writes:

> ---
>  policy/ch-opersys.rst | 65 ++++++++-----------------------------------
>  1 file changed, 12 insertions(+), 53 deletions(-)

> diff --git a/policy/ch-opersys.rst b/policy/ch-opersys.rst
> index 1b63064..5a647fd 100644
> --- a/policy/ch-opersys.rst
> +++ b/policy/ch-opersys.rst
> @@ -329,59 +329,18 @@ The ``/etc/init.d`` directory contains the scripts executed by ``init``
>  at boot time and when the init state (or "runlevel") is changed (see
>  ``init(8)``).
>  
> -There are at least two different, yet functionally equivalent, ways of
> -handling these scripts. For the sake of simplicity, this document
> -describes only the symbolic link method. However, it must not be assumed
> -by maintainer scripts that this method is being used, and any automated
> -manipulation of the various runlevel behaviors by maintainer scripts
> -must be performed using ``update-rc.d`` as described below and not by
> -manually installing or removing symlinks. For information on the
> -implementation details of the other method, implemented in the
> -``file-rc`` package, please refer to the documentation of that package.
> -
> -These scripts are referenced by symbolic links in the ``/etc/rcn.d``
> -directories. When changing runlevels, ``init`` looks in the directory
> -``/etc/rcn.d`` for the scripts it should execute, where ``n`` is the
> -runlevel that is being changed to, or ``S`` for the boot-up scripts.
> -
> -The names of the links all have the form ``Smmscript`` or ``Kmmscript``
> -where mm is a two-digit number and script is the name of the script
> -(this should be the same as the name of the actual script in
> -``/etc/init.d``).
> -
> -When ``init`` changes runlevel first the targets of the links whose
> -names start with a ``K`` are executed, each with the single argument
> -``stop``, followed by the scripts prefixed with an ``S``, each with the
> -single argument ``start``. (The links are those in the ``/etc/rcn.d``
> -directory corresponding to the new runlevel.) The ``K`` links are
> -responsible for killing services and the ``S`` link for starting
> -services upon entering the runlevel.
> -
> -For example, if we are changing from runlevel 2 to runlevel 3, init will
> -first execute all of the ``K`` prefixed scripts it finds in
> -``/etc/rc3.d``, and then all of the ``S`` prefixed scripts in that
> -directory. The links starting with ``K`` will cause the referred-to file
> -to be executed with an argument of ``stop``, and the ``S`` links with an
> -argument of ``start``.
> -
> -The two-digit number mm is used to determine the order in which to run
> -the scripts: low-numbered links have their scripts run first. For
> -example, the ``K20`` scripts will be executed before the ``K30``
> -scripts. This is used when a certain service must be started before
> -another. For example, the name server ``bind`` might need to be started
> -before the news server ``inn`` so that ``inn`` can set up its access
> -lists. In this case, the script that starts ``bind`` would have a lower
> -number than the script that starts ``inn`` so that it runs first:
> -
> -::
> -
> -    /etc/rc2.d/S17bind
> -    /etc/rc2.d/S70inn
> -
> -The two runlevels 0 (halt) and 6 (reboot) are slightly different. In
> -these runlevels, the links with an ``S`` prefix are still called after
> -those with a ``K`` prefix, but they too are called with the single
> -argument ``stop``.
> +``systemd`` uses dependency information contained within the init
> +scripts and symlinks in ``/etc/rcn.d`` to decide which scripts to run
> +and in which order. The ``sysv-rc`` runlevel system uses symlinks in
> +``/etc/rcn.d`` to decide which scripts to run and in which order, see

...and in which order; see the....

> +the ``README.runlevels`` file shipped with ``sysv-rc`` for
> +implementation details. Other alternatives might exist.
> +
> +Maintainer scripts must use ``update-rc.d`` as described below to
> +interact with the service manage for requests such as enabling or
> +disabling services. They should use ``invoke-rc.d`` as described below
> +to invoke initscripts for requests such as starting and stopping
> +service.
>  
>  .. _s-writing-init:
>  
> -- 
> 2.23.0

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: