#!/sbin/sh
#########################################################################
# 									
#   File:	 postremove
#   Description: postremove script fo HPXT2-ADMIN fileset
# 
# *****     This only runs on 10.0 systems     *****
#
#########################################################################
#

set -a

PATH="/bin:/usr/bin:/usr/sbin:/sbin:/etc"

#--------------------------------------------------------------------------##
# remove directories if empty
#--------------------------------------------------------------------------##
#
find /opt/hpxt/enware2/* -depth -type l -exec rm {} \;
find /opt/hpxt/enware2   -depth -type d -exec rmdir {} \;  > /dev/null 2>&1


#--------------------------------------------------------------------------##
# remove symlinks if present
#--------------------------------------------------------------------------##

if [ -h /opt/hpxt/enware2 ]
then
  rm /opt/hpxt/enware2
fi

exit 0
