#!/usr/bin/ksh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/lib/nim/methods/c_dump_notify.sh 1.2 # # Licensed Materials - Property of IBM # # Restricted Materials of IBM # # COPYRIGHT International Business Machines Corp. 2008,2009 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # @(#)00 1.2 src/bos/usr/lib/nim/methods/c_dump_notify.sh, cmdnim, bos720 3/4/09 09:24:31 # # include common NIM shell defines/functions NIMPATH=${0%/*} NIMPATH=${NIMPATH%/*} [[ ${NIMPATH} = ${0} ]] && NIMPATH=/usr/lpp/bos.sysmgt/nim NIM_METHODS="${NIMPATH}/methods" . ${NIM_METHODS}/c_sh_lib echo $0 $@ #---------------------------- local defines -------------------------------- #---------------------------- module globals -------------------------------- REQUIRED_ATTRS="command" OPTIONAL_ATTRS="" #*---------------------------- c_showres ---------------------------- # # NAME: c_showres # # FUNCTION: # sets up remote access to resources, then runs a command to show # information about the resource # # EXECUTION ENVIRONMENT: # # NOTES: # # RECOVERY OPERATION: # # DATA STRUCTURES: # parameters: # global: # # RETURNS: (int) # 0 = no errors # >0 = failure # # OUTPUT: #-----------------------------------------------------------------------------*/ # signal processing trap cleanup 0 trap err_signal 1 2 11 15 # NIM initialization nim_init # initialize local variables typeset c="" typeset client="" # set parameters from command line while getopts :a:qv c do case ${c} in a) # validate the attr ass parse_attr_ass "${OPTARG}" # include the assignment for use in this environment eval ${variable}=\"${value}\" ;; q) # show attr info cmd_what exit 0 ;; v) # verbose mode (for debugging) set -x for i in $(typeset +f) do typeset -ft $i done ;; \?) # unknown option error ${ERR_BAD_OPT} ${OPTARG} ;; esac done ck_attrs shift $((OPTIND - 1)) nohup su guest "-c $command $@" > /dev/null 2>&1 exit 0 nohup su guest "-c $command -amachine=$machine -alabel=$lable -asequnce=$sequnce -aerrid=$errid \ ${dump_location:+-a dump_location=$dump_location} \ ${dump_server:+-a dump_location=$dump_server} " > /dev/null 2>&1 exit 0