#!/bin/sh
#
#       This script will remove, as necessary, the changes introduced by the
#       PXE project.
#

PATID=111307
NUNDO_REV=02

INFO="$PKG_INSTALL_ROOT/var/sadm/pkg/SUNWrmodr/pkginfo"
pids=`egrep '^PATCHLIST' $INFO | nawk -F= '{print $2}'`

add_bootenv=1

undo_bootenv() {
echo "setprop net-config-strategy 'rarp'" >> $PKG_INSTALL_ROOT/boot/solaris/bootenv.rc
}

for i in `echo $pids`; do
        echo $i | egrep -s $PATID || continue
        rev=`expr //$i : '.*-\(.*\)'`
        #No edits for rev-02 or higher
        [ $rev -ge $NUNDO_REV ] && exit
done
[ "$add_bootenv" ] && undo_bootenv 

exit 0
