#! /bin/sh
cd ${2}
#
#	make GateKeeper and MODEM tool suid Root
#
cd GateKeeper.app
chmod u+s GateKeeper
/usr/etc/chown root.wheel GateKeeper
chmod u+s MODEM
/usr/etc/chown root.wheel MODEM
#
#	create default /etc/ppp files if missing
#
if (! test -r /etc/ppp ) ; then
	mkdir /etc/ppp  
fi
if (! test -r /etc/ppp/chap-secrets ) ; then
	touch /etc/ppp/chap-secrets  
	chmod o-rw,g-rw /etc/ppp/chap-secrets
	echo "#
# This file controls CHAP authentication on the local machine.
# See the PPP man page for details.  Make sure this file does 
# not have world read access.
# 
# <userid> <providerid> <Password>
"  >> /etc/ppp/chap-secrets
fi
if (! test -r /etc/ppp/pap-secrets ) ; then
	touch /etc/ppp/pap-secrets  
	chmod o-rw,g-rw /etc/ppp/pap-secrets
	echo "#
# This file controls PAP authentication on the local machine.
# See the PPP man page for details.  Make sure this file does 
# not have world read access.
# 
# <userid> <providerid> <Password>
"  >> /etc/ppp/pap-secrets
fi
if (! test -r /etc/ppp/options ) ; then
	touch /etc/ppp/options  
	chmod o-rw,g-rw /etc/ppp/options
	echo "#
# This is a global PPP options file.  See the PPP man page for details.
#   
" >> /etc/ppp/options
fi
	echo "post install script complete"
exit 0
