#! /sbin/sh
###############################################################################
#  checkinstall for VMAGENT product
#  @(#) $Revision: 7902 $
###############################################################################
#
# (c) Copyright Hewlett-Packard Company 2005
#


###############################################################################
# SD control utilities
###############################################################################

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

exitval=$SUCCESS

###############################################################################
# Do not install on a virtual machine
###############################################################################

vm_model="Integrity Virtual Machine"
if [[ -x /usr/bin/model ]]
then
    is_vm=`/usr/bin/model | /usr/bin/grep -c "$vm_model" `
    if [[ $is_vm -gt 0 ]]
    then
        msg "ERROR:    Cannot install on a virtual machine."
        exitval=1
    fi
fi

exit $exitval
