#!/bin/sh
# This is a script that is used to determine a users tty, then start up
# a ppp session with that user.  It is a kinda buggered up way of dynamic
# ip address allocation, but what the heck, it works :)
# The usual BS--- Copyright 1995, Derek Elder, GPL license.
#
#  As you can see, it simply looks at the users tty and attaches
#  the associated IP address....change the IP address and tty's to
#  match your system.  Enjoy.
#
#  In order to use this, you simply make this file the  users shell
#  in the passwd file.
#
#  Known bugs: None.  If you find any, please mail a copy of the fix 
#   or a suggestion to djelder@basenet.net.
#  
#
 
	#retval=$?
	tty_now=`tty`;
if [ "$tty_now" = "/dev/tty6" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.230
  fi	 
if [ "$tty_now" = "/dev/ttyS16" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.225
  fi
if [ "$tty_now" = "/dev/ttyS17" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.226
  fi
if [ "$tty_now" = "/dev/ttyS18" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.227
  fi
if [ "$tty_now" = "/dev/ttyS19" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.228  
  fi
if [ "$tty_now" = "/dev/ttyS20" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.229
  fi
if [ "$tty_now" = "/dev/ttyS21" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.230
  fi	
if [ "$tty_now" = "/dev/ttyS22" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.231
  fi
if [ "$tty_now" = "/dev/ttyS23" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.232
  fi
if [ "$tty_now" = "/dev/ttyS24" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.233
  fi	 
if [ "$tty_now" = "/dev/ttyp0" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.234
  fi
if [ "$tty_now" = "/dev/ttyp1" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.235
  fi
if [ "$tty_now" = "/dev/ttyp2" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.236
  fi
if [ "$tty_now" = "/dev/ttyp3" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.237
  fi
if [ "$tty_now" = "/dev/ttyp4" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.238
  fi
if [ "$tty_now" = "/dev/ttyp5" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.239
  fi
if [ "$tty_now" = "/dev/ttyp6" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.240
  fi
if [ "$tty_now" = "/dev/ttyp7" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.241
  fi
if [ "$tty_now" = "/dev/ttyp8" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.242
  fi
if [ "$tty_now" = "/dev/ttyp9" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.243
  fi
if [ "$tty_now" = "/dev/ttypa" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.244
  fi
if [ "$tty_now" = "/dev/ttypb" ];
  then
	exec /usr/etc/pppd modem passive :199.3.180.245
  fi 
exit
