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

Bug#76868: final revision of policy diff, and related scripts



This is the final "spellchecked" version of the policy diff.

The invoke-rc.d scripts are available in http://people.debian.org/~hmh/ 
(I think someone might want to test the file-rc one a bit more, it was NOT
tested as much as the sysvinit one).

If there are no objections, this ammendment should be made into policy
proper, and the scripts should be filed against the sysvinit and file-rc
packages as wishlist bugs.

The proposed transition strategy (not in policy) is:

1. coordinate with sysvinit and file-rc maintainers so that:
   - sysvinit release A includes invoke-rc.d, and conflicts with filerc (< B)
   - file-rc release B includes invoke-rc.d (diverts the one in sysvinit to
     invoke-rc.d.links), and depends on sysvinit (>= A)

2. Any packages that use invoke-rc.d need to depend on sysvinit (>= A),
   (or pre-depend, if it uses invoke-rc.d in the preinst AND the
   maintainer does not want to use a simple fallback "if" to the
   direct /etc/init.d call).

3. debhelper should have an wishlist bug filled, asking to migrate to the
   invoke-rc.d way of calling initscripts ASAP (after 1. is deployed).


The invoke-rc.d policy proposal has been seconded by:
  Steve Greenland <stevegr@debian.org> in
    <20010119101429.A14714@molehole.moregruel.net>
  Anthony Towns <aj@azure.humbug.org.au> in
    <20001122213244.D18283@azure.humbug.org.au>
  Manoj Srivastava <srivasta@debian.org> in
    <87ofx4xch7.fsf@glaurung.green-gryphon.com>


The invoke-rc.d(8) manpage is being written, and will be filed as a wishlist
bug against sysvinit at the proper time, along with documents describing the
invoke-rc.d published interface, and the policy-rc.d published interface.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--- policy.text.orig	Tue Feb 27 01:41:55 2001
+++ policy.text	Tue Feb 27 01:47:52 2001
@@ -2706,8 +2706,19 @@
      since the ``/etc/default/'' file is often a conffile, the ``init.d''
      script must behave sensibly without failing if it is deleted.
 
-10.3.3. Managing the links
---------------------------
+10.3.3. Interfacing with the initscript system
+----------------------------------------------
+
+     Maintainers should use the abstraction layer provided by the
+     `update-rc.d' and `invoke-rc.d' programs to deal with initscripts in
+     their packages' scripts such as `postinst', 'prerm' and `postrm'.
+
+     Directly managing the /etc/rc?.d links and directly invoking the
+     /etc/init.d/ initscripts should be done only by packages providing the
+     initscript subsystem (such as `sysvinit' and `file-rc').
+
+10.3.3.1. Managing the links
+----------------------------
 
      The program `update-rc.d' is provided to make it easier for package
      maintainers to arrange for the proper creation and removal of
@@ -2748,6 +2759,45 @@
 
      For more information about using `update-rc.d', please consult its
      manpage update-rc.d(8).
+
+10.3.3.2. Running initscripts
+-----------------------------
+
+     The program `invoke-rc.d' is provided to make it easier for package
+     maintainers to properly invoke an initscript, obeying runlevel and
+     other locally-defined constraints that might limit a package's right to
+     start, stop and otherwise manage services. This program may be used by
+     maintainers in their packages' scripts.
+
+     The use of `invoke-rc.d' to invoke the `/etc/init.d/*' initscripts
+     is strongly recommended[1], instead of calling them directly.
+
+     Footnote [1] In the future, the use of invoke-rc.d to invoke
+     initscripts shall be made mandatory. Maintainers are advised to
+     switch to invoke-rc.d as soon as possible.
+
+     By default, `invoke-rc.d' will pass any action requests (start, stop,
+     reload, restart...) to the /etc/init.d script, filtering out requests
+     to start or restart a service out of its intended runlevels.
+
+     Most packages will simply need to change:
+
+         /etc/init.d/<package> <action>
+
+     in their `postinst' and `prerm' scripts to:
+
+          if [ -x /usr/sbin/invoke-rc.d ] ; then
+             invoke-rc.d <package> <action>
+          else
+             /etc/init.d/<package> <action>
+          fi
+
+     A package should register its initscript services using `update-rc.d'
+     before it tries to invoke them using `invoke-rc.d'. Invocation of
+     unregistered services may fail.
+
+     For more information about using `invoke-rc.d', please consult its
+     manpage invoke-rc.d(8).
 
 10.3.4. Boot-time initialization
 --------------------------------

Attachment: pgpuTcQsbKznT.pgp
Description: PGP signature


Reply to: