#!/bin/sh 
#
# preremove
#
# "@(#) preremove 1.5@(#)"

rem_drv iscm	2> /dev/null
rem_drv ismtp	2> /dev/null
rem_drv isptp	2> /dev/null
#
# This script copies the 103 patch's isppp.cf to isppp.cf.postpatch
# and makes editing changes to isppp.cf so that isppp.cf is compatible
# with 103 FCS.
# Replace interface name isptp with ipdptp and ismtp with ipd.
#
CONFIG_DIR=/etc/opt/SUNWisdn
CONFIG_FILE=/etc/opt/SUNWisdn/isppp.cf
CONFIG_OLD=/etc/opt/SUNWisdn/isppp.cf.postpatch
CONFIG_TMP=/tmp/isppp.cf.tmp
#
#
if [ -f $CONFIG_FILE ]
then
echo "Updating isppp.cf configuration file to 103 FCS PPP devices names"
/usr/bin/cp $CONFIG_FILE $CONFIG_OLD
/usr/bin/sed -e 's/isptp/ipdptp/g' -e 's/ismtp/ipd/g' \
        $CONFIG_FILE > $CONFIG_TMP
/usr/bin/mv  $CONFIG_TMP $CONFIG_FILE
echo "Converted ism to ipd (Point-to-Multipoint Interface)"
echo "Converted isptp to ipdptp (Point-to-Point Interface)"
echo "Completed automatic isppp.cf conversion"
fi

exit 0
