#!/bin/sh
#
# Copyright (c) 2000, by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)postinstall_4335007.sh 1.3   00/06/28 SMI"
#

# Only run this script if this is a Netra ct machine.

if [ `uname -i` != "SUNW,UltraSPARC-IIi-Netract" ] 
then
	exit 0
fi

# Echo the special Install Instructions
echo "*********** SPECIAL INSTALLATION INSTRUCTIONS ***********"
echo "To complete the installation of this patch,"
echo "run the 'rscadm' command to download the new"
echo "firmware image to the flash of the Alarm Card."
echo "example# cd /usr/platform/SUNW,UltraSPARC-IIi-Netract/rsc"
echo "example# ./rscadm download ../lib/images/rscfw"
echo ""
echo "After the download has completed, the Alarm Card will"
echo "reboot itself.  The Alarm Card reboot & self-tests take"
echo "approximately 40 seconds, afterwhich time, the Alarm Card"
echo "will be available for use."
echo "*********** SPECIAL INSTALLATION INSTRUCTIONS ***********"
# Bug #4335007  postinstall script


# Modify /etc/iu.ap, by adding entry for the Netra ct se device
# that communicates with the Alarm Card
if /bin/fgrep -s "	se	16384	16385	ldterm ttcompat" /etc/iu.ap ; then
    echo "Patch for Bug# 4335007 already installed: /etc/iu.ap not modified."
    exit 0
fi

# Apply the patch
cp /etc/iu.ap /tmp/iu.ap
echo 		 "	se	16384	16385	ldterm ttcompat" >> /etc/iu.ap
if [ $? != 0 ] ; then
    echo "/etc/iu.ap file modification failed"
    mv /tmp/iu.ap /etc/iu.ap
    exit 1
else
    echo "/etc/iu.ap file successfully modified"
    exit 0
fi



