[packages/percona-toolkit] pt-kill: workaround for missing exit code check. LP#1314500

glen glen at pld-linux.org
Wed Apr 30 09:27:12 CEST 2014


commit 349c5c338f9de6ab7c84d1d66d23b7d5cbd23ca9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Apr 30 10:27:06 2014 +0300

    pt-kill: workaround for missing exit code check. LP#1314500

 pt-kill.init | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/pt-kill.init b/pt-kill.init
index ed35a76..234d57f 100755
--- a/pt-kill.init
+++ b/pt-kill.init
@@ -41,8 +41,14 @@ start() {
 	msg_starting "pt-kill"
 	# FIXME: instead of removing, fix stop process
 	rm -f $sentinel
-	daemon --user $user --redirfds /usr/bin/pt-kill --config $config --daemonize --pid $pidfile --sentinel $sentinel
+	daemon --user $user --redirfds \
+		/usr/bin/pt-kill --config $config --daemonize --pid $pidfile --sentinel $sentinel
 	RETVAL=$?
+
+	# workaround for lack of exit status check:
+	# https://bugs.launchpad.net/percona-toolkit/+bug/1314500
+	[ ! -f "$pidfile" -a $RETVAL = 0 ] && RETVAL=1
+
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/pt-kill
 }
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/percona-toolkit.git/commitdiff/349c5c338f9de6ab7c84d1d66d23b7d5cbd23ca9



More information about the pld-cvs-commit mailing list