# # 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=SUNW3x10a #BASEDIR_3x10A=${PKG_INSTALL_ROOT}`pkgparam $RELOCATE $PACKAGENAME BASEDIR` BASEDIR_3x10A=`pkgparam $PACKAGENAME BASEDIR` PATH_3x10A=${BASEDIR_3x10A}/SUNW3x10a # /opt/SUNW3x10a/ --> PATH_3x10A if [ "$BASEDIR_3x10A" != "/opt" ]; then echo "\nUpdating the paths for files..." MOD_FILES_3x10A="wbem/mof/reg_instance.mof wbem/mof/reg_3x10.mof wbem/mof/reg_3x10_libpath.mof wbem/mof/3x10.mof wbem/mof/3x10_libpath.mof" for FILE in $MOD_FILES_3x10A; do sed -e "s?/opt/SUNW3x10a/?$PATH_3x10A/?g" \ < ${PATH_3x10A}/$FILE > ${PATH_3x10A}/$FILE.$$ mv -f ${PATH_3x10A}/$FILE.$$ ${PATH_3x10A}/$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 SUNW3x10a ${PATH_3x10A}/$FILE f 0444 root sys done installf -f SUNW3x10a fi # # You can add some code to do mofreg function. #