Package: mysql-server
Version: 4.0.24-10
Tags: patch

The init script for mysql-server implements a "status" command, which is
useful for humans.  But that command doesn't use different exit values
for different statuses, making it useless for scripts.

The following patch
1) exits non-zero if the server is not running (the exit value chosen
   is per LSB), and
2) adds the "status" option to the usage message.


--- mysql-dfsg-4.0.24/debian/mysql-server.init  2005-06-02 13:17:07.000000000 
-0700
+++ debian/mysql-server.init    2005-06-02 13:32:42.000000000 -0700
@@ -150,14 +150,15 @@
   'status')
        if mysqld_status check_alive nowarn; then
          $MYADMIN version
        else
          echo "MySQL is stopped."
+         exit 3
        fi
        ;;
 
   *)
-       echo "Usage: $SELF start|stop|restart|reload|force-reload"
+       echo "Usage: $SELF start|stop|restart|reload|force-reload|status"
        exit 1
        ;;
 esac
 


This patch also applies to mysql-server-4.1 verision 4.1.11-3.

 < Stephen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to