#!/bin/sh
#@(#)cluster	1.4 03/02/99 23:53:04

####
##
## Get the necessary information for HA and SunCluster.
##	SUNWhadf    - is HA
##	SUNWcluster - is SunCluster
##
####

# Test for existance of cluster SW
#
if [ ! -d /etc/opt/SUNWhadf ] &&
   [ ! -d /etc/opt/SUNWcluster ]
then
    # No cluster SW installed
    exit 0
fi

mkdir cluster

CURR_DIR=`pwd`

for I in var etc
do
   for J in SUNWhadf SUNWcluster oracle sybase informix
   do
     if [ -d /"$I"/opt/"$J" ]
     then
       mkdir "$CURR_DIR"/cluster/"$I"_opt_"$J"
       cd /"$I"/opt/"$J"
       find . -depth -mount -print | cpio -pdlm "$CURR_DIR"/cluster/"$I"_opt_"$J" 2>/dev/null
     fi
   done
done

cd $CURR_DIR
