]> git.pld-linux.org Git - packages/percona-toolkit.git/commitdiff
pt-kill: workaround for missing exit code check. LP#1314500
authorElan Ruusamäe <glen@delfi.ee>
Wed, 30 Apr 2014 07:27:06 +0000 (10:27 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 30 Apr 2014 07:27:06 +0000 (10:27 +0300)
pt-kill.init

index ed35a76fa476c7f56365da5cad001316d2f250c6..234d57f02e31947d30b28a71c5a3b6aa718b1bb0 100755 (executable)
@@ -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
 }
 
This page took 0.070126 seconds and 4 git commands to generate.