#!/bin/ksh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/lib/nim/methods/c_chwpar.sh 1.2 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2008 # 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 # # COMPONENT_NAME: CMDNIM # # # @(#)23 1.2 src/bos/usr/lib/nim/methods/c_chwpar.sh, cmdnim, bos720 7/15/08 13:39:25 # 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 #---------------------------- module globals -------------------------------- REQUIRED_ATTRS="" OPTIONAL_ATTRS="cmd_flags" #---------------------------- c_chwpar -------------------------------- # # NAME: c_chwpar # # FUNCTION: # Changes a wpar # # EXECUTION ENVIRONMENT: # # # RECOVERY OPERATION: # # DATA STRUCTURES: # parameters: # global: # # RETURNS: (int) # # OUTPUT: #------------------------------------------------------------------------------- # signal processing trap cleanup 0 trap err_signal 1 2 11 15 # NIM initialization nim_init # 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) verbose=TRUE set -x for i in $(typeset +f) do typeset -ft $i done ;; \?) # unknown option error ${ERR_BAD_OPT} ${OPTARG} ;; esac done # check for missing attrs ck_attrs shift $((OPTIND - 1)) ${CHWPAR} ${cmd_flags} $@ 2>${ERR} # Save the return code from the command. cmd_rc=$? if [[ ${cmd_rc} -ne 0 ]] then err_from_cmd ${CHWPAR} fi # all done exit ${cmd_rc}