]> git.pld-linux.org Git - packages/mysql.git/commitdiff
init: report when mysql program needed
authorElan Ruusamäe <glen@delfi.ee>
Thu, 24 Sep 2015 13:06:01 +0000 (16:06 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 24 Sep 2015 13:06:01 +0000 (16:06 +0300)
mysql.init

index 3edbdc0fd2f59d33d19aa0f5b4e42ddbee4ea681..cf04ef2ae7e32293f6b7ae8b2e627b66e5a69dd2 100755 (executable)
@@ -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
This page took 0.209196 seconds and 4 git commands to generate.