commit 596521413f7577ee959a4eee1449f146e43cd9c0
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:04 2016 +0100

    Bug#835520: [PATCH v2 01/11] Drop outdated "/run needs initscripts dependency"
    
    The paragraph ends with
    "...until the stable release of Debian supports /run."
    which current releases does, so this paragraph is obsolete.

diff --git a/policy.sgml b/policy.sgml
index 9cd182b..81df4a3 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7053,12 +7053,6 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 		  in <file>/run</file> should be stored on a temporary
 		  file system.
 		</p>
-		<p>
-		  Packages must not assume the <file>/run</file>
-		  directory exists or is usable without a dependency
-		  on <tt>initscripts (>= 2.88dsf-13.3)</tt> until the
-		  stable release of Debian supports <file>/run</file>.
-		</p>
 	      </item>
 	      <item>
 		<p>

commit e553ef727fe28006a2f240d8de70a5f761c77c86
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:05 2016 +0100

    Bug#835520: [PATCH v2 02/11] Update init-system title to be more agnostic
    
    Get rid of "script" as that doesn't properly describe the equivalent for
    systems using declarative replacements.
    
    Also drop "the" as via update-rc.d you're potentially/likely interfacing
    with multiple ones at a time. Possibly the word system should be
    replaced with systems or system(s)?

diff --git a/policy.sgml b/policy.sgml
index 81df4a3..07b7e4f 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7648,7 +7648,7 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	</sect1>
 
 	<sect1>
-	  <heading>Interfacing with the initscript system</heading>
+	  <heading>Interfacing with init systems</heading>
 
 	  <p>
 	    Maintainers should use the abstraction layer provided by

commit 5314e486798c5f112d0463a88b050448b2e2c92b
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:06 2016 +0100

    Bug#835520: [PATCH v2 03/11] Drop obsolete paragraph about static runlevels and update-rc.d
    
    These days the information in the LSB header is used.
    
    Manually specifying/overriding runlevels as a parameter to
    update-rc.d on command line is even deprecated and a noop stub
    these days.

diff --git a/policy.sgml b/policy.sgml
index 07b7e4f..32e1efc 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7691,19 +7691,6 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	    </p>
 
 	    <p>
-	      By default <prgn>update-rc.d</prgn> will start services in
-	      each of the multi-user state runlevels (2, 3, 4, and 5)
-	      and stop them in the halt runlevel (0), the single-user
-	      runlevel (1) and the reboot runlevel (6).  The system
-	      administrator will have the opportunity to customize
-	      runlevels by simply adding, moving, or removing the
-	      symbolic links in <file>/etc/rc<var>n</var>.d</file> if
-	      symbolic links are being used, or by modifying
-	      <file>/etc/runlevel.conf</file> if the <tt>file-rc</tt> method
-	      is being used.
-	    </p>
-
-	    <p>
 	      To get the default behavior for your package, put in your
 	      <prgn>postinst</prgn> script
 	      <example compact="compact">

commit 51034145478cbaf2e3d027f7e82cce48ef1673b6
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:07 2016 +0100

    Bug#835520: [PATCH v2 04/11] Drop outdated paragraph about sequence numbers
    
    Todays init systems calculates a dependency graph (eg. from the
    dependencies specified in LSB headers) and doesn't go by sequence
    numbers. See eg. insserv.

diff --git a/policy.sgml b/policy.sgml
index 32e1efc..d1108be 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7708,15 +7708,6 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	    </p>
 
 	    <p>
-	      This will use a default sequence number of 20.  If it does
-	      not matter when or in which order the <file>init.d</file>
-	      script is run, use this default.  If it does, then you
-	      should talk to the maintainer of the <prgn>sysvinit</prgn>
-	      package or post to <tt>debian-devel</tt>, and they will
-	      help you choose a number.
-	    </p>
-
-	    <p>
 	      For more information about using <tt>update-rc.d</tt>,
 	      please consult its man page <manref name="update-rc.d"
 		section="8">.

commit 8ab2800dc5c641442391530c0e78a4e072b0b74f
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:08 2016 +0100

    Bug#835520: [PATCH v2 05/11] Add note about update-rc.d normally used via dh
    
    It might not be the policy's place to define how the maintainer should
    automate the packaging work, but at least mention debhelper to not
    fool people into thinking manually writing maintainer scripts is
    the preferred method of using update-rc.d.

diff --git a/policy.sgml b/policy.sgml
index d1108be..37cac8a 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7712,6 +7712,14 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	      please consult its man page <manref name="update-rc.d"
 		section="8">.
 	    </p>
+
+	    <p>
+	      Note that the packaging should normally not call update-rc.d
+	      directly but through debhelper programs that add the required
+	      update-rc.d calls automatically.
+	      (See <prgn>dh_installinit</prgn>,
+	      <prgn>dh_systemd_enable</prgn>, etc.)
+	    </p>
 	  </sect2>
 
 	  <sect2>

commit 6964322775655fe9cc10f7804c9104feed05add5
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:09 2016 +0100

    Bug#835520: [PATCH v2 06/11] Add "or equivalent" to must use invoke-rc.d paragraph
    
    The intention is to also make sure that eg. it's equally not
    allowed to directly call 'systemctl <action> <unit>' but maybe
    the wording can be improved further to more clearly express this.
    In other words the language is still a bit outdated in this paragraph.

diff --git a/policy.sgml b/policy.sgml
index 37cac8a..742ab81 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7736,8 +7736,8 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	    <p>
 	      The package maintainer scripts must use
 	      <prgn>invoke-rc.d</prgn> to invoke the
-	      <file>/etc/init.d/*</file> initscripts, instead of
-	      calling them directly.
+	      <file>/etc/init.d/*</file> initscripts or equivalent,
+	      instead of calling them directly.
 	    </p>
 
 	    <p>

commit 24d45b9269c69e6c11957a04d55218fb569da0b4
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:10 2016 +0100

    Bug#835520: [PATCH v2 07/11] Drop legacy code from invoke-rc.d example
    
    For several releases the *-rc.d policy tools have always been available
    on the system. At points we've had bugs that created corner-cases
    which make the *-rc.d tools go missing during an upgrade phase,
    but that should not be worked around in each and every package.
    Thus remove the check if invoke-rc.d is available (as it's a bug
    in some other package if it isn't these days).
    
    Slightly reword the paragraph to not sound like anything should be
    converted (which isn't the normal case these days), rather than just
    use invoke-rc.d.
    
    Closes: #833177

diff --git a/policy.sgml b/policy.sgml
index 742ab81..d2e39ae 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7749,17 +7749,11 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	    </p>
 
 	    <p>
-	      Most packages will simply need to change:
-	      <example compact="compact">/etc/init.d/&lt;package&gt;
-	      &lt;action&gt;</example> in their <prgn>postinst</prgn>
-	      and <prgn>prerm</prgn> scripts to:
+	      Most packages will simply use:
 	      <example compact="compact">
-	if which invoke-rc.d >/dev/null 2>&1; then
 		invoke-rc.d <var>package</var> &lt;action&gt;
-	else
-		/etc/init.d/<var>package</var> &lt;action&gt;
-	fi
 	      </example>
+	      in their <prgn>postinst</prgn> and <prgn>prerm</prgn> scripts.
 	    </p>
 
 	    <p>

commit 5364c04bc7d67ff6ac16967239dbe9e77fa03f94
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:11 2016 +0100

    Bug#835520: [PATCH v2 08/11] Add note about invoke-rc.d normally used via dh
    
    It might not be the policys place to define how the maintainer should
    automate the packaging work, but atleast mention debhelper to not
    fool people into thinking manually writing maintainer scripts is
    the preferred method of using invoke-rc.d.
    
    (This is similar to previous commit about update-rc.d but with
    invoke-rc.d and also dh_systemd_enable replaced by dh_systemd_start.)

diff --git a/policy.sgml b/policy.sgml
index d2e39ae..2589fe5 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7768,6 +7768,14 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	      <prgn>invoke-rc.d</prgn>, please consult its man page
 	      <manref name="invoke-rc.d" section="8">.
 	    </p>
+
+	    <p>
+	      Note that the packaging should normally not call invoke-rc.d
+	      directly but through debhelper programs that add the required
+	      invoke-rc.d calls automatically.
+	      (See <prgn>dh_installinit</prgn>,
+	      <prgn>dh_systemd_start</prgn>, etc.)
+	    </p>
 	  </sect2>
 	</sect1>
 

commit 658c3c24802c611916275586b94175eb66ced28b
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:12 2016 +0100

    Bug#835520: [PATCH v2 09/11] Drop obsolete paragraph about rc.boot
    
    No idea how long ago this paragraph had any relevance....

diff --git a/policy.sgml b/policy.sgml
index 2589fe5..707b716 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7780,19 +7780,6 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	</sect1>
 
 	<sect1>
-	  <heading>Boot-time initialization</heading>
-
-          <p>
-            There used to be another directory, <file>/etc/rc.boot</file>,
-            which contained scripts which were run once per machine
-            boot. This has been deprecated in favour of links from
-            <file>/etc/rcS.d</file> to files in <file>/etc/init.d</file> as
-            described in <ref id="/etc/init.d">.  Packages must not
-            place files in <file>/etc/rc.boot</file>.
-	  </p>
-	</sect1>
-
-	<sect1>
 	  <heading>Example</heading>
 
 	  <p>

commit dfa8faea6709a9784ff9bcfad25e9174694c8b4b
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:13 2016 +0100

    Bug#835520: [PATCH v2 10/11] Add reference to systemd integration examples
    
    In addition to the sysvinit skeleton file also point out
    where to find systemd integration examples.

diff --git a/policy.sgml b/policy.sgml
index 707b716..871011f 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7786,6 +7786,8 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	    An example on which you can base your
 	    <file>/etc/init.d</file> scripts is found in
 	    <file>/etc/init.d/skeleton</file>.
+	    Examples on which you can base your systemd integration on
+	    is available in the man page <manref name="systemd.unit" section="8">.
 	  </p>
 
 	</sect1>

commit a8e08d5d992eb9d7f564b9924cea77cd03fbed47
Author: Andreas Henriksson <andreas@fatal.se>
Date:   Sat Dec 17 13:57:14 2016 +0100

    Bug#835520: [PATCH v2 11/11] Drop entire section 9.4 Console messages from init.d scripts
    
    The entire section is specific to sysvinit and already solved
    by LSB in that case. There's no point in reinventing LSB.
    Also other init systems handles this in ways that's not at all
    described here. Just drop the entire section as it gives no
    practical useful information.

diff --git a/policy.sgml b/policy.sgml
index 871011f..409949e 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7793,202 +7793,6 @@ test -f <var>program-executed-later-in-script</var> || exit 0
 	</sect1>
       </sect>
 
-      <sect>
-	<heading>Console messages from <file>init.d</file> scripts</heading>
-
-	<p>
-	  This section describes the formats to be used for messages
-	  written to standard output by the <file>/etc/init.d</file>
-	  scripts.  The intent is to improve the consistency of
-	  Debian's startup and shutdown look and feel.  For this
-	  reason, please look very carefully at the details.  We want
-	  the messages to have the same format in terms of wording,
-	  spaces, punctuation and case of letters.
-	</p>
-
-	<p>
-	  Here is a list of overall rules that should be used for
-	  messages generated by <file>/etc/init.d</file> scripts.  
-	</p>
-
-	<p>
-	  <list>
-	    <item>
-		The message should fit in one line (fewer than 80
-		characters), start with a capital letter and end with
-		a period (<tt>.</tt>) and line feed (<tt>"\n"</tt>).
-	    </item>
-
-	    <item>
-              If the script is performing some time consuming task in
-              the background (not merely starting or stopping a
-              program, for instance), an ellipsis (three dots:
-              <tt>...</tt>) should be output to the screen, with no
-              leading or tailing whitespace or line feeds.
-	    </item>
-
-	    <item>
-              The messages should appear as if the computer is telling
-              the user what it is doing (politely :-), but should not
-                mention "it" directly.  For example, instead of:
-		<example compact="compact">
-I'm starting network daemons: nfsd mountd.
-		</example>
-		the message should say
-		<example compact="compact">
-Starting network daemons: nfsd mountd.
-		</example>
-	    </item>
-	  </list>
-	</p>
-
-	<p>
-          <tt>init.d</tt> script should use the following  standard
-          message formats for the situations enumerated below.
-	</p>
-
-	<p>
-	  <list>
-	    <item>
-	      <p>When daemons are started</p>
-
-	      <p>
-		If the script starts one or more daemons, the output
-		should look like this (a single line, no leading
-		spaces):
-		<example compact="compact">
-Starting <var>description</var>: <var>daemon-1</var> ... <var>daemon-n</var>.
-		</example>
-		The <var>description</var> should describe the
-		subsystem the daemon or set of daemons are part of,
-		while <var>daemon-1</var> up to <var>daemon-n</var>
-		denote each daemon's name (typically the file name of
-		the program).
-	      </p>
-
-	      <p>
-		For example, the output of <file>/etc/init.d/lpd</file>
-		would look like:
-		<example compact="compact">
-Starting printer spooler: lpd.
-		</example>
-	      </p>
-
-	      <p>
-		This can be achieved by saying
-		<example compact="compact">
-echo -n "Starting printer spooler: lpd"
-start-stop-daemon --start --quiet --exec /usr/sbin/lpd
-echo "."
-		</example>
-		in the script. If there are more than one daemon to
-		start, the output should look like this:
-		<example compact="compact">
-echo -n "Starting remote file system services:"
-echo -n " nfsd"; start-stop-daemon --start --quiet nfsd
-echo -n " mountd"; start-stop-daemon --start --quiet mountd
-echo -n " ugidd"; start-stop-daemon --start --quiet ugidd
-echo "."
-		</example>
-		This makes it possible for the user to see what is
-		happening and when the final daemon has been started.
-		Care should be taken in the placement of white spaces:
-		in the example above the system administrators can
-		easily comment out a line if they don't want to start
-		a specific daemon, while the displayed message still
-		looks good.
-	      </p>
-	    </item>
-
-	    <item>
-	      <p>When a system parameter is being set</p>
-
-	      <p>
-		If you have to set up different system parameters
-		during the system boot, you should use this format:
-		<example compact="compact">
-Setting <var>parameter</var> to "<var>value</var>".
-		</example>
-	      </p>
-
-	      <p>
-		You can use a statement such as the following to get
-		the quotes right:
-		<example compact="compact">
-echo "Setting DNS domainname to \"$domainname\"."
-		</example>
-	      </p>
-
-	      <p>
-                Note that the same symbol (<tt>"</tt>) <!-- " --> is used
-                for the left and right quotation marks.  A grave accent
-                (<tt>`</tt>) is not a quote character; neither is an
-                apostrophe (<tt>'</tt>).
-	      </p>
-	    </item>
-
-	    <item>
-	      <p>When a daemon is stopped or restarted</p>
-
-	      <p>
-		When you stop or restart a daemon, you should issue a
-		message identical to the startup message, except that
-		<tt>Starting</tt> is replaced with <tt>Stopping</tt>
-		or <tt>Restarting</tt> respectively.
-	      </p>
-
-	      <p>
-		For example, stopping the printer daemon will look like
-		this:
-		<example compact="compact">
-Stopping printer spooler: lpd.
-		</example>
-	      </p>
-	    </item>
-
-	    <item>
-	      <p>When something is executed</p>
-
-	      <p>
-		There are several examples where you have to run a
-		program at system startup or shutdown to perform a
-		specific task, for example, setting the system's clock
-		using <prgn>netdate</prgn> or killing all processes
-		when the system shuts down.  Your message should look
-		like this:
-		<example compact="compact">
-Doing something very useful...done.
-		</example>
-		You should print the <tt>done.</tt> immediately after
-		the job has been completed, so that the user is
-		informed why they have to wait.  You can get this
-		behavior by saying
-		<example compact="compact">
-echo -n "Doing something very useful..."
-do_something
-echo "done."
-		</example>
-		in your script.
-	      </p>
-	    </item>
-
-	    <item>
-	      <p>When the configuration is reloaded</p>
-
-	      <p>
-		When a daemon is forced to reload its configuration
-		files you should use the following format:
-		<example compact="compact">
-Reloading <var>description</var> configuration...done.
-		</example>
-		where <var>description</var> is the same as in the
-		daemon starting message.
-	      </p>
-	    </item>
-	  </list>
-	</p>
-      </sect>
-
       <sect id="cron-jobs">
 	<heading>Cron jobs</heading>
 
