#!/sbin/sh

#########################################################################
# 									
#   File:	 customize
#   @(#) customize $Revision: 1.11 $ $Date: 93/05/18 12:00:31 $
#   Description: /etc/update customization script for HPXT2-PRINTER fileset
# 
#########################################################################
#

umask 022
PATH="/bin:/usr/bin:/etc:."
FILESET=HPXT2-PRINTER

MIXED=0
ARCHEXT=""

# Get environment variables as setup earlier in prerequisite fileset    
#
ENVARDIRS="/opt/hpxt/enware2/lbin /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

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

fi

# find out which machine type we are running on
MACHINE=`uname -m`
MACHINE=`basename $MACHINE`
case $MACHINE in
   3*|4*)
	MACHINE=300
	ARCH="HP-MC68020"
	;;
6*|7*|8*)
	MACHINE=800
	ARCH="HP-PA"
	;;
      *)
	echo "ERROR:   Unknown model of computer."
	exit 1
	;;
esac

# find out which release of HP-UX we are running on
RELEASE=`uname -r | sed -e 's/[^0-9.]//g' -e 's/^\.//' | cut -d. -f1`
if [ $RELEASE -ge 8 ]
then
	OS=80
else
     if [ $RELEASE -eq 7 ]
     then
	echo "ERROR:   release $OS of operating system unsupported"
	exit 1
     else
	echo "ERROR:   Unknown release of operating system."
	exit 1
     fi
fi

if [ "$OS" = "hp10" ]
then
  cp /opt/hpxt/enware2/share/man/man1m.Z/hpnptyd.1m /usr/man/man1m.Z/hpnptyd.1m
  cp /opt/hpxt/enware2/share/man/man1m.Z/hpnpf.1m   /usr/man/man1m.Z/hpnpf.1m
fi


exit 0
