5882N/A# The contents of this file are subject to the terms of the 5882N/A# Common Development and Distribution License (the "License"). 5882N/A# You may not use this file except in compliance with the License. 5882N/A# See the License for the specific language governing permissions 5882N/A# and limitations under the License. 5882N/A# When distributing Covered Code, include this CDDL HEADER in each 5882N/A# If applicable, add the following below this CDDL HEADER, with the 5882N/A# fields enclosed by brackets "[]" replaced with your own identifying 5882N/A# information: Portions Copyright [yyyy] [name of copyright owner] 5882N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. 5882N/A# SMF_FMRI is the name of the target service. This allows multiple instances 5882N/A echo "SMF framework variables are not initialized." 5882N/Aif [ -z
"${MYSQLCNF}" ];
then 5882N/Aif [ -z
"${MYSQLBIN}" ];
then 5882N/Aif [ -z
"${MYSQLDATA}" ];
then 5882N/Aif [ ! -d
"${MYSQLDATA}" ];
then 5882N/A echo "mysql/data directory ${MYSQLDATA} is not a valid MySQL data directory" 6275N/A# ping function which return success when mysqld starts accepting connections 6275N/A# or return failure in case of timeout after $STARTTIMEOUT seconds. 6275N/A# using this function in mysql_start(), method waits/blocks to mysqld is really ready, 6275N/A# which might take some time in case of recovery. 6275N/A # Check if mysqld_safe is still alive, if not there is no hope 6275N/A echo "MySQL Database start up timeout after ${STARTTIMEOUT}s" 5882N/A# refresh method for this service is not defined because mysqld by itself 5882N/A# cannot accept a HUP signal to reload the configuration file my.cnf 6275N/A echo "Starting service MySQL" 6275N/A echo "Failed to start service MySQL"