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

Bug#601455: Full patch for this bug -- seeking seconds



control: tag -1 +patch

Hello,

Thank you to those who reviewed my patch and especially to Felipe for
patching init-system-helpers, and to Russ for writing the /etc/default
text (which I've tweaked only slightly).

I realised that a dependency on init-system-helpers (>= 1.5.0) is needed
if you're going to use the new defaults-disabled option.  So here is the
updated patch, for which I am seeking seconds.

Andreas, Russ -- please considering seconding this updated text.

diff --git a/policy/ch-opersys.rst b/policy/ch-opersys.rst
index 7d9e20a..193e3d1 100644
--- a/policy/ch-opersys.rst
+++ b/policy/ch-opersys.rst
@@ -537,6 +537,29 @@ and in your ``postrm``
         update-rc.d package remove
     fi

+The default behaviour is to enable autostarting your package's daemon.
+If the daemon should not be autostarted unless the local administrator
+has explicitly requested this, instead add to your ``postinst`` script
+
+::
+
+    update-rc.d package defaults-disabled
+
+and add a dependency on ``init-system-helpers (>= 1.5.0)``, which
+introduced the ``defaults-disabled`` option.
+
+An older practice, which should not be used, was to include a line
+like ``DISABLED=yes`` in the package's ``/etc/default`` file.  The
+package's init script would not start the service until the local
+system administrator changed this to ``DISABLED=no``, or similar.  The
+problem with this approach was that it hides from the init system
+whether or not the daemon should actually be started, which leads to
+inconsistent and confusing behavior: ``service <package> start`` may
+return success but not start the service; services with a dependency
+on this service will be started even though the service isn't running;
+and init system status commands may incorrectly claim that the service
+was started.
+
 Note that if your package changes runlevels or priority, you may have to
 remove and recreate the links, since otherwise the old links may
 persist. Refer to the documentation of ``update-rc.d``.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature


Reply to: