Package: haproxy Version: 1.6.2-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu xenial ubuntu-patch
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: [ Jorge Niedbalski ] * debian/haproxy.init: + Pass the pidfile to the --pidfile argument instead of the PID number, easing backports to pre-systemd versions of Ubuntu and Debian (LP: #1477198). On older Ubuntu versions (pre systemd), the stop action was not working correctly in the init script; this patch resolves that issue. Thanks for considering the patch. -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.2.0-16-generic (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru haproxy-1.6.2/debian/haproxy.init haproxy-1.6.2/debian/haproxy.init --- haproxy-1.6.2/debian/haproxy.init 2015-11-03 20:21:36.000000000 +0000 +++ haproxy-1.6.2/debian/haproxy.init 2015-11-09 09:39:47.000000000 +0000 @@ -61,10 +61,8 @@ fi ret=0 - for pid in $(cat $PIDFILE); do - start-stop-daemon --quiet --oknodo --stop \ - --retry 5 --pid $pid --exec $HAPROXY || ret=$? - done + start-stop-daemon --quiet --oknodo --stop \ + --retry 5 --pidfile $PIDFILE --exec $HAPROXY || ret=$? [ $ret -eq 0 ] && rm -f $PIDFILE