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

Bug#851708: debian-policy: Add try-restart action for init script



Package: debian-policy
Version: 3.9.8.0
Severity: wishlist

Hi,

systemd supports try-restart:
https://www.freedesktop.org/software/systemd/man/systemctl.html#try-restart%20PATTERN...

I think it's really usefull so why not add it to supported/optional
action? Use-case: "invoke-rc.d <service> try-restart" in postinst
when you want to restart dependant service.

This started here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851688

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

debian-policy depends on no packages.

debian-policy recommends no packages.

Versions of packages debian-policy suggests:
ii  doc-base  0.10.7

-- no debconf information
diff --git a/policy.sgml b/policy.sgml
index b0b2e09..17b2d21 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7555,6 +7555,10 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 	      <item>stop and restart the service if it's already running,
 		  otherwise start the service</item>
 
+	      <tag><tt>try-restart</tt></tag>
+	      <item>stop and restart the service if it's already running.
+		  </item>
+
 	      <tag><tt>reload</tt></tag>
 	      <item><p>cause the configuration of the service to be
 		  reloaded without actually stopping and restarting
@@ -7569,7 +7573,7 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 	    The <tt>start</tt>, <tt>stop</tt>, <tt>restart</tt>, and
 	    <tt>force-reload</tt> options should be supported by all
 	    scripts in <file>/etc/init.d</file>, the <tt>reload</tt>
-	    option is optional.
+	    and <tt>try-restart</tt> option is optional.
 	  </p>
 
 	  <p>

Reply to: