#!/sbin/sh

#########################################################################
# 									
#   File:	 customize
#   @(#) customize $Revision: 1.4 $ $Date: 93/02/17 14:50:13 $
#   Description: /etc/update customization script for HPXT-ENVIZEX fileset
# 
#########################################################################
#

umask 022
set -a
PATH="/bin:/usr/bin:/etc:/usr/bin/X11/700X/admin"

FILESET=HPXT-ENVIZEX


# Get environment variables as setup earlier in prerequisite fileset    
#
ENVARDIRS="/opt/hpxt/enware/lbin /usr/bin/X11/700X/admin /tmp /usr/tmp last"
for ENVARDIR in $ENVARDIRS
do
  if [ $ENVARDIR = "last" ]
  then
    echo "WARNING: cannot find suitable env.vars file"
    exit 0
  fi

  if [ -f $ENVARDIR/env.vars ]
  then
    . $ENVARDIR/env.vars
    break
  fi
done


if [ "$OS" = "hp10" ]
then
  PATH=$SW_PATH:/opt/hpxt/enware/lbin

  if [ -f /usr/bin/dcnodes -o -f /usr/sbin/dcnodes ]
  then
    dcnodes -q
    if [ $? -eq 2 ]
    then
        exit 0
    fi
  fi


  # Make swverify happy since this file is shared with HPXT-TOKN
  #
  xtutil_add-file $NEWDIR/bin/XEnvizex
fi

if [ "$OS" = "hp" ]
then
  ARCH=$1
  ARCHEXT=""
  case $ARCH in
    HP-MC68*)
	if [ ! hp9000s300 ]
	then
	    ARCHEXT="+/$ARCH"
	fi
	;;
  esac
fi

umask 22

#
# Remove old mono server - not used
#

if [ "$OS" = "hp" ]
then
  rm -f $SERVERDIR/C2729A 2>/dev/null
  rm -f $SERVERDIR/C2729A.hlp 2>/dev/null
 rm -f /usr/tftpdir/usr/lib/X11/700X/config/C2729A.cfg 2>/dev/null
fi

exit 0
