components/mysql-5-7/Solaris/mysql_57
author Gipson Pulla <gipson.pulla@oracle.com>
Fri, 24 Jun 2016 10:34:41 -0700
changeset 6277 073d7b623ddf
parent 5884 ef644c2bdc65
child 7506 497cdd942859
permissions -rw-r--r--
21150630 mysql SMF instances should check to see if it's really online before returning
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5884
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     1
#!/sbin/sh
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     2
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     3
# CDDL HEADER START
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     4
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     8
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    12
# and limitations under the License.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    13
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    19
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    20
# CDDL HEADER END
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    21
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    22
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    23
#
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    24
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    25
. /lib/svc/share/smf_include.sh
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    26
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    27
# SMF_FMRI is the name of the target service. This allows multiple instances 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    28
# to use the same script.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    29
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    30
if [ -z $SMF_FMRI ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    31
        echo "SMF framework variables are not initialized."
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    32
        exit $SMF_EXIT_ERR
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    33
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    34
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    35
getproparg() {
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    36
	val=`svcprop -p $1 $SMF_FMRI`
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    37
	[ -n "$val" ] && echo $val
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    38
}
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    39
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    40
MYSQLCNF=`getproparg mysql/cnf`
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    41
MYSQLBIN=`getproparg mysql/bin`
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    42
MYSQLDATA=`getproparg mysql/data`
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    43
PIDFILE=${MYSQLDATA}/`/usr/bin/uname -n`.pid
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    44
LOG_ERROR=${MYSQLDATA}/`/usr/bin/uname -n`.err
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    45
STARTTIMEOUT=180
5884
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    46
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    47
if [ -z "${MYSQLCNF}" ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    48
        echo "mysql/cnf property not set"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    49
        exit $SMF_EXIT_ERR_CONFIG
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    50
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    51
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    52
if [ -z "${MYSQLBIN}" ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    53
        echo "mysql/bin property not set"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    54
        exit $SMF_EXIT_ERR_CONFIG
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    55
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    56
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    57
if [ -z "${MYSQLDATA}" ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    58
	echo "mysql/data property not set"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    59
	exit $SMF_EXIT_ERR_CONFIG
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    60
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    61
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    62
if [ ! -d "${MYSQLDATA}" ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    63
	echo "mysql/data directory ${MYSQLDATA} is not a valid MySQL data directory"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    64
	exit $SMF_EXIT_ERR_CONFIG
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    65
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    66
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    67
if [ ! -d "${MYSQLDATA}"/mysql ]; then
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    68
	(
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    69
	exec 2>&1
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    70
	set -x
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    71
	"${MYSQLBIN}"/mysqld --initialize --user=mysql --datadir="${MYSQLDATA}" --log-error="${LOG_ERROR}"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    72
	)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    73
fi
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    74
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    75
# ping function which return success when mysqld starts accepting connections
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    76
# or return failure in case of timeout after $STARTTIMEOUT seconds.
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    77
# using this function in mysql_start(), method waits/blocks to mysqld is really ready,
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    78
# which might take some time in case of recovery.
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    79
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    80
mysql_pinger() {    
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    81
    mysqld_safe_pid=$1
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    82
    timer=$STARTTIMEOUT
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    83
    ret=0
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    84
    while [ $timer -gt 0 ]; do
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    85
        sleep 1
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    86
        "${MYSQLBIN}"/mysqladmin --no-defaults --socket="/tmp/mysql.sock" --user=UNKNOWN_MYSQL_USER ping >/dev/null 2>&1 && break
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    87
	timer=$(expr $timer - 1)
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    88
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    89
	# Check if mysqld_safe is still alive, if not there is no hope
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    90
	if ! kill -0 $mysqld_safe_pid >/dev/null 2>&1 ; then
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    91
	    ret=1
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    92
	    break
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    93
	fi
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    94
    done
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    95
    
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    96
    # Did we timeout?
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    97
    if [ $timer = 0 ]; then
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    98
	echo "MySQL Database start up timeout after ${STARTTIMEOUT}s"
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
    99
	ret=1
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   100
    fi
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   101
    return $ret
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   102
}
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   103
5884
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   104
# refresh method for this service is not defined because mysqld by itself
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   105
# cannot accept a HUP signal to reload the configuration file my.cnf
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   106
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   107
mysql_start() 	{
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   108
	(
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   109
	exec 2>&1
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   110
	set -x
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   111
	"${MYSQLBIN}"/mysqld_safe --defaults-file="${MYSQLCNF}" --user=mysql --datadir="${MYSQLDATA}" --pid-file="${PIDFILE}" > /dev/null &
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   112
	
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   113
	if mysql_pinger $! ; then
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   114
            echo "Starting service MySQL"
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   115
        else
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   116
            echo "Failed to start service MySQL"
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   117
            exit $SMF_EXIT_ERR
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   118
        fi
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 5884
diff changeset
   119
	
5884
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   120
	)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   121
}
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   122
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   123
case "$1" in
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   124
'start')
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   125
	mysql_start 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   126
	;;
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   127
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   128
*)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   129
	echo "Usage: $0 start"
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   130
	exit 1
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   131
	;;
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   132
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   133
esac
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
   134
exit $SMF_EXIT_OK