#!/bin/sh 
#
# postinstall
#
# "@(#) postinstall 1.12@(#)"

add_drv iscm	2> /dev/null
add_drv ismtp	2> /dev/null
add_drv isptp	2> /dev/null


# This script copies the 102(3) isppp.cf to isppp.cf.old
# and makes editing changes to isppp.cf.
# Replace interface name ipdptp with isptp and ipd with ismtp.
#
CONFIG_DIR=/etc/opt/SUNWisdn
CONFIG_FILE=/etc/opt/SUNWisdn/isppp.cf
CONFIG_OLD=/etc/opt/SUNWisdn/isppp.cf.old
CONFIG_TMP=/tmp/isppp.cf.tmp
#
#
if [ -f $CONFIG_FILE ]
then
echo "Updating isppp.cf configuration file to support new PPP devices names"
/usr/bin/cp $CONFIG_FILE $CONFIG_OLD
/usr/bin/sed -e 's/ipdptp/isptp/g' -e 's/ipd/ismtp/g' \
	$CONFIG_FILE > $CONFIG_TMP
/usr/bin/mv  $CONFIG_TMP $CONFIG_FILE
echo "Converted ipd to ismtp (Point-to-Multipoint Interface)"
echo "Converted ipdptp to isptp (Point-to-Point Interface)"
echo "Completed automatic isppp.cf conversion"
fi

#
exit 0
