Ubuntu Pastebin

Paste from Louis Bouchard at Fri, 6 Nov 2015 20:07:06 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff -Nru haproxy-1.5.4/debian/changelog haproxy-1.5.4/debian/changelog
--- haproxy-1.5.4/debian/changelog	2015-08-23 20:45:27.000000000 +0200
+++ haproxy-1.5.4/debian/changelog	2015-09-17 11:27:25.000000000 +0200
@@ -1,3 +1,11 @@
+haproxy (1.5.4-1ubuntu2.1~ubuntu14.04.2) trusty-backports; urgency=medium
+
+  * Fix failure to stop service.
+    - SysVinit script used --pid option of start-stop-daemon which is
+      not available in Trusty. (LP: #1494141)
+
+ -- Louis Bouchard <louis.bouchard@ubuntu.com>  Thu, 17 Sep 2015 11:25:30 +0200
+
 haproxy (1.5.4-1ubuntu2.1~ubuntu14.04.1) trusty-backports; urgency=medium
 
   * No-change backport to trusty (LP: #1473162)
diff -Nru haproxy-1.5.4/debian/haproxy.init haproxy-1.5.4/debian/haproxy.init
--- haproxy-1.5.4/debian/haproxy.init	2015-06-08 22:52:11.000000000 +0200
+++ haproxy-1.5.4/debian/haproxy.init	2015-09-17 11:21:58.000000000 +0200
@@ -29,6 +29,12 @@
 [ -f /etc/default/rcS ] && . /etc/default/rcS
 . /lib/lsb/init-functions
 
+trap clean EXIT
+
+clean()
+{
+rm -f $tmp
+}
 
 check_haproxy_config()
 {
@@ -61,10 +67,13 @@
 	fi
 
 	ret=0
+	tmp=$(tempfile -s .haproxy.init)
 	for pid in $(cat $PIDFILE); do
+		echo $pid > $tmp
 		start-stop-daemon --quiet --oknodo --stop \
-			--retry 5 --pid $pid --exec $HAPROXY || ret=$?
+			--retry 5 --pidfile $tmp  --exec $HAPROXY || ret=$?
 	done
+	rm -f $tmp
 
 	[ $ret -eq 0 ] && rm -f $PIDFILE
 
Download as text