#!/bin/sh # # ppp-on # # Set up a PPP link # LOCKDIR=/var/spool/uucp DEVICE=cua3 . /usr/local/etc/PPP_private # This file contains private info, in the following format: #export PHONE=5551234 #export USER=spade #export PASSWORD=CoolPWD #export OUR_IP_ADDR=128.0.0.200 if [ -f $LOCKDIR/LCK..$DEVICE ] then if ps `cat $LOCKDIR/LCK..$DEVICE` then echo "PPP device is locked" exit 1 else /usr/lib/ppp/unlock LCK..$DEVICE fi fi /usr/lib/ppp/fix-cua $DEVICE ( stty 38400 -tostop if /usr/lib/ppp/chat -v -l LCK..$DEVICE \ ABORT "NO CARRIER" ABORT BUSY \ "" ATZ OK ATS7=50L2V1\&C1E1Q0DT$PHONE CONNECT "" \ ogin: $USER ssword: \\q$PASSWORD then /usr/lib/ppp/pppd \ modem \ crtscts \ defaultroute \ mru 1500 \ $OUR_IP_ADDR: \ /dev/$DEVICE sleep 10 exit 0 else echo "PPP call failed" 1>&2 exit 1 fi ) < /dev/$DEVICE > /dev/$DEVICE