This file starts a 'normal' ppp session. I no longer use it, but it was neccessary to get ppp working in the first place.
The problems of connecting to the ISP are the same with either PPP or Diald, so get PPP working first.
#!/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/sbin/unlock LCK..$DEVICE
fi
fi
/usr/sbin/fix-cua $DEVICE
(
stty 38400 -tostop
if /usr/sbin/chat -v \
ABORT "NO CARRIER" ABORT BUSY \
"" ATZ OK ATS7=90L2V1\&C1E1Q0M0DT$PHONE CONNECT "" \
ogin: $USER ssword: \\q$PASSWORD
then
/usr/sbin/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
This program or script is executed with the same real and effective user-ID as pppd, that is, at least the effective user-ID and possibly the real user-ID will be root. This is so that it can be used to manipulate routes, run privileged daemons (e.g. sendmail), etc. Be careful that the contents of the /etc/ppp/ip-up and /etc/ppp/ip-down scripts do not compromise your system's security.
#! /bin/sh echo ppp up `date` > /dev/console # This might be a good place to invoke fetchmail to retreive # mail from the ISP. # This is also a good place to fix up routes.
#!/bin/sh # /usr/sbin/ppp-off DEVICE=ppp0 # # If the ppp0 pid file is present then the program is running. Stop it. if [ -r /var/run/$DEVICE.pid ]; then kill -INT `cat /var/run/$DEVICE.pid` # # If unsuccessful, ensure that the pid file is removed. # if [ ! "$?" = "0" ]; then echo "removing stale $DEVICE pid file." rm -f /var/run/$DEVICE.pid exit 1 fi # # Success. Terminate with proper status. # echo "$DEVICE link terminated" exit 0 fi # # The link is not active # echo "$DEVICE link is not active" exit 1
#! /bin/sh /usr/local/sbin/unlock LCK..cua3 > /dev/console 2<&1
Index,
Back
On to Diald