[packages/mysql] init: report when mysql program needed
glen
glen at pld-linux.org
Thu Sep 24 15:06:13 CEST 2015
commit 13e5a8de308ac9214f1af2291ef7aff6301efa97
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Sep 24 16:06:01 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 3edbdc0..cf04ef2 100755
--- a/mysql.init
+++ b/mysql.init
@@ -358,6 +358,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/13e5a8de308ac9214f1af2291ef7aff6301efa97
More information about the pld-cvs-commit
mailing list