Robert Edmonds wrote:
> Julien Cristau wrote:
> > May I take the opportunity to ask you to also fix the 'stop' action from
> > the init script?
> > 
> > We've been using this patch on the debian.org hosts for a year now.
> > Previously restarting the service would quite often result in no running
> > unbound, because (AIUI) systemd doesn't use the init script 'restart'
> > action (uses stop && start instead), the 'stop' action would not wait
> > for the process to actually die before returning, and then 'start' would
> > say "I'm already running, nothing to do".
> 
> Wow, thanks for pointing that out. Yes, I'd be happy to fix that one too
> in a stable update.

Here is the updated debdiff for the package I'd like to upload to
jessie.

diff -Nru unbound-1.4.22/debian/changelog unbound-1.4.22/debian/changelog
--- unbound-1.4.22/debian/changelog     2016-02-21 18:43:22.000000000 -0500
+++ unbound-1.4.22/debian/changelog     2016-07-04 15:58:35.000000000 -0400
@@ -1,3 +1,11 @@
+unbound (1.4.22-3+deb8u2) jessie; urgency=medium
+
+  * debian/unbound.init: Add "pidfile" magic comment (Closes: #807132)
+  * debian/unbound.init: Call start-stop-daemon with --retry for 'stop'
+    action (patch from Julien Cristau)
+
+ -- Robert Edmonds <edmo...@debian.org>  Mon, 04 Jul 2016 15:58:01 -0400
+
 unbound (1.4.22-3+deb8u1) jessie; urgency=medium
 
   * iterator/iter_hints.c: Update hints for H.ROOT-SERVERS.NET
diff -Nru unbound-1.4.22/debian/patches/debian-changes 
unbound-1.4.22/debian/patches/debian-changes
--- unbound-1.4.22/debian/patches/debian-changes        2016-02-22 
10:58:04.000000000 -0500
+++ unbound-1.4.22/debian/patches/debian-changes        2016-07-04 
16:06:41.000000000 -0400
@@ -5,12 +5,13 @@
  information below has been extracted from the changelog. Adjust it or drop
  it.
  .
- unbound (1.4.22-3+deb8u1) jessie; urgency=medium
+ unbound (1.4.22-3+deb8u2) jessie; urgency=medium
  .
-   * iterator/iter_hints.c: Update hints for H.ROOT-SERVERS.NET
-     (Closes: #815370)
+   * debian/unbound.init: Add "pidfile" magic comment (Closes: #807132)
+   * debian/unbound.init: Call start-stop-daemon with --retry for 'stop'
+     action (patch from Julien Cristau)
 Author: Robert Edmonds <edmo...@debian.org>
-Bug-Debian: https://bugs.debian.org/815370
+Bug-Debian: https://bugs.debian.org/807132
 
 ---
 The information above should follow the Patch Tagging Guidelines, please
@@ -23,7 +24,7 @@
 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
 Forwarded: <no|not-needed|url proving that it has been forwarded>
 Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
+Last-Update: 2016-07-04
 
 --- unbound-1.4.22.orig/acx_python.m4
 +++ unbound-1.4.22/acx_python.m4
diff -Nru unbound-1.4.22/debian/unbound.init unbound-1.4.22/debian/unbound.init
--- unbound-1.4.22/debian/unbound.init  2016-02-21 18:43:22.000000000 -0500
+++ unbound-1.4.22/debian/unbound.init  2016-07-04 15:58:35.000000000 -0400
@@ -7,6 +7,7 @@
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 ### END INIT INFO
+# pidfile: /run/unbound.pid
 
 NAME=unbound
 DESC="recursive DNS server"
@@ -121,7 +122,7 @@
     stop)
         if $UNBOUND_ENABLE; then
             log_daemon_msg "Stopping $DESC" "$NAME"
-            if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE 
--name $NAME; then
+            if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE 
--name $NAME --retry 5; then
                 do_resolvconf_stop
                 log_end_msg 0
             else

-- 
Robert Edmonds
edmo...@debian.org

Reply via email to