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

Bug#76868: invoke-rc.d FINAL PROPOSAL



This is the final revision of the invoke-rc.d script and proposal, Posted as
a changelog to minimise bandwidth usage.

Changelog:
  (policy proposal)
  * no changes since last changelog

  (invoke-rc.d)
  * less verbosity on common situations
    - no error message on deny unless --disclose-deny
    - no unknown action warnings unless policy-rc.d

The policy proposal itself is attached to this email, I am looking for
seconds, now.

The proposal has been seconded once so far, by Anthony Towns
<ajt@debian.org>.

-- 
  "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	Wed Nov 15 09:44:42 2000
+++ policy.text	Wed Nov 15 09:56:19 2000
@@ -1076,8 +1076,19 @@
 
             test -f <program-executed-later-in-script> || exit 0
 
-3.3.3. Managing the links
--------------------------
+3.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').
+
+3.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
@@ -1118,6 +1129,45 @@
 
      For more information about using `update-rc.d', please consult its
      manpage update-rc.d(8).
+
+3.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 constrains 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).
 
 3.3.4. Boot-time initialization
 -------------------------------

Attachment: pgp3KzuYz1O1h.pgp
Description: PGP signature


Reply to: