# # Copyright (c) 2002 Sun Microsystems, Inc. All rights reserved # #ident "@(#)postinstall 1.50 02/09/27 SMI" RELOCATE= if [ "$PKG_INSTALL_ROOT" != "" ]; then RELOCATE="-R $PKG_INSTALL_ROOT" fi if [ "$PKG_INSTALL_ROOT" = "/" ]; then PKG_INSTALL_ROOT="" fi # # modify files to reflect the right install path. # PACKAGENAME=SUNWagsdk #BASEDIR_AGSDK=${PKG_INSTALL_ROOT}`pkgparam $RELOCATE $PACKAGENAME BASEDIR` BASEDIR_AGSDK=`pkgparam $PACKAGENAME BASEDIR` PATH_AGSDK=${BASEDIR_AGSDK}/SUNWagsdk # /opt/SUNWagsdk/ --> PATH_AGSDK if [ "$BASEDIR_AGSDK" != "/opt" ]; then echo "\nUpdating the paths for files..." MOD_FILES_AGSDK="wbem/mof/agentSDK_jsrv.mof wbem/mof/agsdk.mof wbem/mof/reg_agsdk.mof wbem/mof/dmtf/2.8/reg_CIM28.mof" for FILE in $MOD_FILES_AGSDK; do sed -e "s?/opt/SUNWagsdk/?$PATH_AGSDK/?g" \ < ${PATH_AGSDK}/$FILE > ${PATH_AGSDK}/$FILE.$$ mv -f ${PATH_AGSDK}/$FILE.$$ ${PATH_AGSDK}/$FILE # what we modified file are mof file, so it are all 044 root sys, # if it include any sh file, it should be "055 root bin" installf SUNWagsdk ${PATH_AGSDK}/$FILE f 0444 root sys done installf -f SUNWagsdk fi # # You can add some code to do mofreg function. #