# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
if [ -z $SMF_FMRI ]; then
exit $SMF_EXIT_ERR
if [ -z ${MYSQLCNF} ]; then
exit $SMF_EXIT_ERR_CONFIG
if [ -z ${MYSQLBIN} ]; then
exit $SMF_EXIT_ERR_CONFIG
if [ -z ${MYSQLDATA} ]; then
exit $SMF_EXIT_ERR_CONFIG
if [ ! -d ${MYSQLDATA} ]; then
exit $SMF_EXIT_ERR_CONFIG
# cannot accept a HUP signal to reload the configuration file my.cnf
echo ${MYSQLBIN}/mysqld_safe --defaults-file=${MYSQLCNF} --user=mysql --datadir=${MYSQLDATA} --pid-file=${PIDFILE}
${MYSQLBIN}/mysqld_safe --defaults-file=${MYSQLCNF} --user=mysql --datadir=${MYSQLDATA} --pid-file=${PIDFILE} > /dev/null &
if [ -f ${PIDFILE} ]; then
smf_kill_contract $1 KILL 1 30
exit $SMF_EXIT_OK