#!/sbin/sh
#------------------------------------------------------------------#
#
# HPUX_ID: @(#) $Revision: 17.3 $ generated on Mon Jun 25 13:50:05 PDT 2001
#
# (c)Copyright 1983-2001 Hewlett-Packard Co.,  All Rights Reserved.
#
#------------------------------------------------------------------#
# SD configure script template for use with all patches.           #
#------------------------------------------------------------------#
# This file is optional for all patches.  The purpose of this      #
# script is to perform patch installation actions that cannot be   #
# accomplished by simple unconditional file extraction from the    #
# software source media.                                           #
#------------------------------------------------------------------#

_PATCHID=PHCO_24437


UTILS="/usr/lbin/sw/control_utils"

if [ ! -f $UTILS ]; then
    echo "ERROR:   Cannot find $UTILS"
    exit 1
fi

. $UTILS
exitval=$SUCCESS

#####
##### Insert any code you may require at this point in the script.
##### Pay attention to the exitval variable and set appropriately
##### in your code.  If you are unsure as to what types of operations
##### are legal in this file and what types aren't, consult the 
##### "Guidelines for SD Control Scripts" document.
#####
##### START_CUSTOMIZATION_HERE


#
# Check if LVM-MIRROR-RUN is installed on the system.
#
typeset MIRROR=

if swlist $remote_opt -lfileset LVM.LVM-MIRROR-RUN @ ${SW_ROOT_DIRECTORY} \
       2>/dev/null | grep -q LVM-MIRROR-RUN ; then
   MIRROR=1;
else
   MIRROR=0;
fi

#
# 
#

if (( MIRROR == 1 )) ; then
   # Update info on files changed by postinstall (IPD_addfile can do this).
   IPD_addfile /sbin/lvchange                             LVM.LVM-RUN
   IPD_addfile /usr/sbin/lvchange                         LVM.LVM-RUN

   # Delete info on files moved by postinstall.
   # IPD_delfile /usr/newconfig/sbin/lvchange.mir           LVM.LVM-MIRROR-RUN
   # IPD_delfile /usr/newconfig/usr/sbin/lvchange.mir       LVM.LVM-MIRROR-RUN
   # IPD_delfile /usr/newconfig/sbin/lvchange.mir     $_PATCHID.LVM-MIRROR-RUN
   # IPD_delfile /usr/newconfig/usr/sbin/lvchange.mir $_PATCHID.LVM-MIRROR-RUN

   # Add info on files created by postinstall.
   IPD_addfile /sbin/lvchange                       $_PATCHID.LVM-RUN
   IPD_addfile /usr/sbin/lvchange                   $_PATCHID.LVM-RUN
fi

#
# End inserted code.
#


exit $exitval
