#!/bin/sh
#
# @(#)postinstall       1.24 12 Jul 1993 Copyright 1993 SMI
#
# Copyright (c) 1993 Sun Microsystems, Inc.  All Rights Reserved.
# Sun considers its source code as an unpublished, proprietary trade
# secret, and it is available only under strict license provisions.
# This copyright notice is placed here only to protect Sun in the event
# the source is deemed a published work.
#
# RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the
# Government is subject to restrictions as set forth in subparagraph
# (c)(1)(ii) of the Rights in Technical Data and Computer Software
# clause at DFARS 52.227-7013 and in similar clauses in the FAR and
# NASA FAR Supplement.
#

#
#	Modify the version number of the SUNW3270c pkginfo file
#	from 8.0 to 8.0.1.  This will also the user to apply
#	8.0.1 client patches to the package.
#

echo "postinstall script beginning . . ."
echo "Modifying pkginfo for SUNW3270c . . ."

if (test -s /var/sadm/pkg/SUNW3270c/pkginfo.fcs); then

  echo "fcs pkginfo file had been previously saved . . ."
  echo "Using pkginfo.fcs . . ."

elif (test -s /var/sadm/pkg/SUNW3270c/pkginfo); then

  echo "Saving fcs pkginfo file as pkginfo.fcs . . ."
  mv /var/sadm/pkg/SUNW3270c/pkginfo /var/sadm/pkg/SUNW3270c/pkginfo.fcs

fi

if (test -s /var/sadm/pkg/SUNW3270c/pkginfo.fcs); then

  echo "Creating new pkginfo file . . ."
  sed 's/VERSION=8.0.*1*/VERSION=8.0.1/' /var/sadm/pkg/SUNW3270c/pkginfo.fcs > /var/sadm/pkg/SUNW3270c/pkginfo

  echo "postinstall script has completed successfully . . ."

else

  echo "pkginfo(.fcs) not found in /var/sadm/pkg/SUNW3270c . . ."
  echo "postinstall script was not successful . . ."

fi

echo "End of postinstall script."

