[packages/mysql/MYSQL_5_0] init: report when mysql program needed
glen
glen at pld-linux.org
Thu Sep 24 15:42:08 CEST 2015
commit d7805b592dce4fec010893afe04d90ccb3f12f46
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Sep 24 16:39:27 2015 +0300
init: report when mysql program needed
mysql.init | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/mysql.init b/mysql.init
index 2141bdd..8107df9 100755
--- a/mysql.init
+++ b/mysql.init
@@ -360,6 +360,11 @@ mysqlstop() {
# report slave status
# uses MYSQL_SOCKET - path to mysql socket
slave_status() {
+ if [ ! -x /usr/bin/mysql ]; then
+ echo >&2 "Slave status not available: 'mysql' program not installed."
+ return
+ fi
+
# see if slave status can be reported
local err=0 slave_status=$(mysql --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" -e 'show slave status\G')
if [ -z "$slave_status" ]; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mysql.git/commitdiff/7d358ed1a3f3624b058df686e98f969b3cc2758b
More information about the pld-cvs-commit
mailing list