components/mysql-5-5/Solaris/mysql_55
author Octave Orgeron <octave.orgeron@oracle.com>
Thu, 08 Sep 2016 13:16:06 -0600
changeset 6866 4c1935f5ec9a
parent 6277 073d7b623ddf
child 7506 497cdd942859
permissions -rw-r--r--
24394524 MySQL Cluster support for Cinder must be ported to Mitaka 24394534 MySQL Cluster support for Glance must be ported to Mitaka 24394543 MySQL Cluster support for Heat must be ported to Mitaka 24394552 MySQL Cluster support for Ironic must be ported to Mitaka 24394567 MySQL Cluster support for Keystone must be ported to Mitaka 24394574 MySQL Cluster support for Neutron must be ported to Mitaka 24394587 MySQL Cluster support for Nova must be ported to Mitaka 24409419 MySQL Cluster support for oslo.db must be ported to Mitaka
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     1
#!/sbin/sh
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     2
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     3
# CDDL HEADER START
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     4
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     8
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    12
# and limitations under the License.
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    13
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    19
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    20
# CDDL HEADER END
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    21
#
6033
9719142d2b5d 23227671 Upgrade MySQL 5.5 to 5.5.49 on Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents: 1541
diff changeset
    22
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    23
#
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    24
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    25
. /lib/svc/share/smf_include.sh
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    26
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    27
# SMF_FMRI is the name of the target service. This allows multiple instances 
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    28
# to use the same script.
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    29
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    30
if [ -z $SMF_FMRI ]; then
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    31
        echo "SMF framework variables are not initialized."
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    32
        exit $SMF_EXIT_ERR
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    33
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    34
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    35
getproparg() {
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    36
	val=`svcprop -p $1 $SMF_FMRI`
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    37
	[ -n "$val" ] && echo $val
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    38
}
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    39
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    40
MYSQLCNF=`getproparg mysql/cnf`
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    41
MYSQLBIN=`getproparg mysql/bin`
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    42
MYSQLDATA=`getproparg mysql/data`
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    43
PIDFILE=${MYSQLDATA}/`/usr/bin/uname -n`.pid
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    44
STARTTIMEOUT=180
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    45
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    46
if [ -z ${MYSQLCNF} ]; then
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    47
        echo "mysql/cnf property not set"
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    48
        exit $SMF_EXIT_ERR_CONFIG
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    49
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    50
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    51
if [ -z ${MYSQLBIN} ]; then
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    52
        echo "mysql/bin property not set"
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    53
        exit $SMF_EXIT_ERR_CONFIG
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    54
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    55
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    56
if [ -z ${MYSQLDATA} ]; then
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    57
	echo "mysql/data property not set"
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    58
	exit $SMF_EXIT_ERR_CONFIG
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    59
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    60
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    61
if [ ! -d ${MYSQLDATA} ]; then
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    62
	echo "mysql/data directory ${MYSQLDATA} is not a valid MySQL data directory"
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    63
	exit $SMF_EXIT_ERR_CONFIG
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    64
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    65
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    66
if [ ! -d ${MYSQLDATA}/mysql ]; then
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    67
	echo ${MYSQLBIN}/mysql_install_db --user=mysql --datadir=${MYSQLDATA}
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    68
	${MYSQLBIN}/mysql_install_db --user=mysql --datadir=${MYSQLDATA}
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    69
fi
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
    70
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    71
# 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: 6033
diff changeset
    72
# 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: 6033
diff changeset
    73
# 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: 6033
diff changeset
    74
# 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: 6033
diff changeset
    75
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    76
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: 6033
diff changeset
    77
    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: 6033
diff changeset
    78
    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: 6033
diff changeset
    79
    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: 6033
diff changeset
    80
    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: 6033
diff changeset
    81
        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: 6033
diff changeset
    82
        ${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: 6033
diff changeset
    83
	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: 6033
diff changeset
    84
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    85
	# 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: 6033
diff changeset
    86
	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: 6033
diff changeset
    87
	    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: 6033
diff changeset
    88
	    break
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    89
	fi
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    90
    done
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    91
    
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    92
    # 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: 6033
diff changeset
    93
    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: 6033
diff changeset
    94
	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: 6033
diff changeset
    95
	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: 6033
diff changeset
    96
    fi
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    97
    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: 6033
diff changeset
    98
}
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
    99
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   100
# refresh method for this service is not defined because mysqld by itself
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   101
# cannot accept a HUP signal to reload the configuration file my.cnf
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   102
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   103
mysql_start() 	{
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   104
	echo ${MYSQLBIN}/mysqld_safe --defaults-file=${MYSQLCNF} --user=mysql --datadir=${MYSQLDATA} --pid-file=${PIDFILE}
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   105
	${MYSQLBIN}/mysqld_safe --defaults-file=${MYSQLCNF} --user=mysql --datadir=${MYSQLDATA} --pid-file=${PIDFILE} > /dev/null &
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   106
6277
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
   107
        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: 6033
diff changeset
   108
            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: 6033
diff changeset
   109
        else
073d7b623ddf 21150630 mysql SMF instances should check to see if it's really online before returning
Gipson Pulla <gipson.pulla@oracle.com>
parents: 6033
diff changeset
   110
            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: 6033
diff changeset
   111
            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: 6033
diff changeset
   112
        fi
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   113
}
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   114
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   115
case "$1" in
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   116
'start')
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   117
	mysql_start 
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   118
	;;
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   119
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   120
*)
6033
9719142d2b5d 23227671 Upgrade MySQL 5.5 to 5.5.49 on Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents: 1541
diff changeset
   121
	echo "Usage: $0 start"
1541
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   122
	exit 1
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   123
	;;
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   124
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   125
esac
b62d499c009a PSARC 2013/333 Update MySQL to 5.5; EOF MySQL 5.1
Akhil Mohan <akhil.mohan@oracle.com>
parents:
diff changeset
   126
exit $SMF_EXIT_OK