#! /sbin/sh
########
# Product: Ignite-UX
# Fileset: OBAM-RUN
# checkinstall
# @(#) $Revision: 10.6 $
########
#
# (c) Copyright Hewlett-Packard Company 1996
#
########################################################################

##########################################################################
#
# Automatically exclude loading of the OBAM-RUN fileset on
# HP-UX systems that are not 10.0/10.01/10.10/10.20/11.00. And that
# don't have the BOOT-KERNEL fileset loaded.  These are most
# likely 11.X network-recovery clients 
#


UTILS=/usr/lbin/sw/control_utils
if [ -f $UTILS ]
then
    . $UTILS
else
    echo "ERROR:   Cannot find $UTILS"
    exit 1
fi

case $(uname -r) in
*.10.00|*.10.01|*.10.10|*.10.20|*.11.00)
    # A new obam is needed on these releases
    exit $SUCCESS
    ;;
*)
    if [ -f /opt/ignite/boot/INSTALL ] || \
       is_software_selected Ignite-UX.BOOT-KERNEL || \
       is_software_selected Ignite-UX.BOOT-KERNEL-PA || \
       is_software_selected Ignite-UX.BOOT-KERNEL-IA 
    then
        # This system has the possibility of becoming a network recovery
        # server, in which case OBAM-RUN would be needed by any 10.X clients
        # that it may support.
        exit $SUCCESS
    fi

    if [ -f /usr/obam/lib/libobam.1 ] ; then
        echo "\
NOTE:    The version of the ObAM tools on the system are sufficient,
         and it does not appear that this system will be a
         net-recovery server.  The Ignite-UX.OBAM-RUN fileset is not
         required and will be excluded from loading to save space."
        exit $EXCLUDE
    fi
    ;;
esac
exit $SUCCESS
