Home | History | Annotate | Download | only in mys
      1 #!/usr/bin/ksh
      2 #
      3 # CDDL HEADER START
      4 #
      5 # The contents of this file are subject to the terms of the
      6 # Common Development and Distribution License (the License).
      7 # You may not use this file except in compliance with the License.
      8 #
      9 # You can obtain a copy of the license at usr/src/CDDL.txt
     10 # or http://www.opensolaris.org/os/licensing.
     11 # See the License for the specific language governing permissions
     12 # and limitations under the License.
     13 #
     14 # When distributing Covered Code, include this CDDL HEADER in each
     15 # file and include the License file at usr/src/CDDL.txt.
     16 # If applicable, add the following below this CDDL HEADER, with the
     17 # fields enclosed by brackets [] replaced with your own identifying
     18 # information: Portions Copyright [yyyy] [name of copyright owner]
     19 #
     20 # CDDL HEADER END
     21 #
     22 
     23 #
     24 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     25 # Use is subject to license terms.
     26 #
     27 
     28 #ident	"@(#)probe_smf_mysql.ksh	1.7	07/06/06 SMI"
     29 
     30 #
     31 # This method is called by the optional probe script of the smf method 
     32 #
     33 # Method for the mysql agents smf manifest it is called from the control script
     34 # only if it is an smf probe and the project in the smf serfice is not :default
     35 # This assures, that most of the probe is running under the correct project.
     36 #
     37 # It is started with 1 parameter
     38 #
     39 # $1 ist the SMF_FMRI identifier which specifies the smf service
     40 #
     41 
     42 MYNAME=`basename ${0}`
     43 MYDIR=`dirname ${0}`
     44 
     45 if [ -f /lib/svc/share/smf_include.sh ]
     46 then
     47 	. /lib/svc/share/smf_include.sh
     48 fi
     49 
     50 . ${MYDIR}/../etc/config
     51 . ${MYDIR}/../lib/functions_static
     52 . ${MYDIR}/functions
     53 
     54 debug_message "Method: ${MYNAME} ${1} - Begin"
     55 ${SET_DEBUG}
     56 	
     57 # Setting SMF_FMRI 
     58         
     59 SMF_FMRI=${1}	
     60 
     61 # getting the necessary parameters and filling the variables filled
     62 # in from options if it is called in global zone
     63 
     64 get_fmri_parameters
     65 
     66 variables_init
     67 
     68 # perform the check
     69 check_mysql
     70 rc_val=${?}
     71 
     72 debug_message "Method: ${MYNAME} ${1} - End"
     73 exit ${rc_val}
     74