#!/bin/sh # ****************************************************************************** # *** IDENTIFICATION *** # ****************************************************************************** # Name: preremove # Title: Disk Array Utilities Pre Remove # Version: # Revision: $Revision:$ # Update Date: $Date: $ # Programmer: bem # Documents: # # COPYRIGHT 1996 by Symbios Logic Inc. # # Description: Pre remove script for the disk array utilities # # ****************************************************************************** # *** PROCEDURES *** # ****************************************************************************** # Do not allow package removal # if the array is root/boot if grep rootdev /etc/system | grep -v "^*" | grep rdriver >/dev/null 2>&1 then echo echo " *** WARNING ***" echo echo " Cannot remove $PKGINST because of RDAC root/boot configuration" echo " If you have a newer version of $PKGINST, you may install it on" echo " top of the older version." echo echo " Aborting pkgrm of $PKGINST" echo exit 1 fi # Stop the daemons # Cant use BASEDIR here. Must use direct path. Bad things can happen if # daemons not stopped. /etc/init.d/amdemon stop 2>/dev/null /etc/init.d/rdacctrl stop 2>/dev/null # Save copies of critical files cp ${BASEDIR}/lib/osa/rmparams ${BASEDIR}/tmp/rmparams 2>/dev/null cp ${BASEDIR}/lib/osa/bin/rmscript ${BASEDIR}/tmp/rmscript 2>/dev/null echo "A copy of ${BASEDIR}/lib/osa/bin/rmparams has been saved in directory ${BASEDIR}/tmp" exit 0