#!/bin/sh
#
# Copyright 2000-2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)postbackout        1.7     02/04/16 SMI"
#

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

if [ `uname -i` != "SUNW,UltraSPARC-IIi-Netract" ] &&
 [ `uname -i` != "SUNW,UltraSPARC-IIe-NetraCT-40" ] ;
then
	exit 0
fi

# Modify /etc/iu.ap, by removing the entry for the Netra ct se device
# that communicates with the Alarm Card.  Remove both old and new

if [ ! -f $ROOTDIR/etc/iu.ap ]; then
        exit 0
fi

if fgrep -s "	se	16384	0	ldterm ttcompat" $ROOTDIR/etc/iu.ap ; then
	if fgrep -s "	se	16384	16385	ldterm ttcompat" $ROOTDIR/etc/iu.ap ; then
    	echo "Deleting sspctl entry from /etc/iu.ap."
   	grep -v "	se	16384	16385	ldterm ttcompat" $ROOTDIR/etc/iu.ap > /tmp/iu.ap 
   	mv /tmp/iu.ap $ROOTDIR/etc/iu.ap
    	exit 0
	fi
exit 0
fi


