#!/bin/ksh -p
#
# ident "@(#)utemgrctl.ksh	1.2 12/09/12 Oracle"
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
#

set -u
########################################################################
#
# Sets up services config file and library compatlinks for EM Plugin
#
########################################################################

PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

########################################################################
#
# Operation entry points, one for each keyword.  This is where the
# specific work for this feature happens.
#
########################################################################


#
# disable()
#
disable() {

    if [ -d ${SUNWUTETC} ]; then
	rm -f ${SUNWUTETC}/utsservices.cfg
    fi 

}

#
# enable()
#
enable() {

	if [ -d ${SUNWUTETC} ] && [ -f ${TMPL_SERVICESCFG} ]; then
		cp $TMPL_SERVICESCFG ${SUNWUTETC}/utsservices.cfg
	fi
    
}


#########################################
# LOCAL VARIABLES
# They must defined here to resolve the some of parameter resolution
# problem
#########################################
local_variables() {

        TMPL_SERVICESCFG=${SUNWUT}/etc/template/utsservices.cfg

}


#########################################
#
# Configurable parameter
#
#########################################
# NONE

#########################################
#
# variables used in the shared script utctl-shlib
#
#########################################

DESCR="Sets up services config file for EM Plugin"

########################################################################
#
# Execution starts here
#
########################################################################

PROGPATH=`dirname $0`
. $PROGPATH/utctl-shlib
