# @(#)03 1.2 src/bos/usr/lib/nim/methods/c_add_fb_script.sh, cmdnim, bos720 9/26/05 15:38:34 # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/lib/nim/methods/c_add_fb_script.sh 1.2 # # Licensed Materials - Property of IBM # # Restricted Materials of IBM # # COPYRIGHT International Business Machines Corp. 2001,2005 # 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 NIMPATH=${0%/*} NIMPATH=${NIMPATH%/*} [[ ${NIMPATH} = ${0} ]] && NIMPATH=/usr/lpp/bos.sysmgt/nim NIM_METHODS="${NIMPATH}/methods" export NIMPATH NIM_METHODS # # "dot" include (source) the shell lib functions # . ${NIM_METHODS}/c_sh_lib # --------------------------- local defines # --------------------------- module globals REQUIRED_ATTRS="location" OPTIONAL_ATTRS="" location="" # ---------------------------- c_add_fb_script # # NAME: c_add_fb_script # # FUNCTION: # adds the contents of fb_script object into /etc/firstboot file # # 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 source= rc= # 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 # # check for missing attrs # ck_attrs # # ensure local access to the file (local path returned via access_pnt) # nim_mount ${location} # # Adding fb_script object's contents to /etc/firstboot. # ${CAT} ${access_pnt} >> ${FIRSTBOOT} # success exit 0