Explanation
trcppp.
You have to replace ||...|| by the host IP address that you
want to connect, the phone number of the host, your user id, and your
password.
The script works (at least on my Linux bos), but may have bugs. Sorry!
Normal PPP Connection Script
#!/bin/sh PHONE_NUMBER=||XX-XXXX|| # Phone number for sh1, sh2 or ... PPP_HOST=||163.220.1.10|| # 163.220.1.10=sh1, 163.220.1.9=sh2, ... PPP_UID=||user id|| PPP_PASSWD=||password|| CALLBACK= export PHONE_NUMBER PPP_UID PPP_PASSWD PPP_HOST CALLBACK PPP_ABORT='ABORT "NO CARRIER" ABORT BUSY' trcppp
Call-back PPP Connection Script
#!/bin/sh PHONE_NUMBER=||XX-XXXX|| # Phone number for sh1, sh2 or ... PPP_HOST=||163.220.1.10|| # 163.220.1.10=sh1, 163.220.1.9=sh2, ... PPP_UID=||user id|| PPP_PASSWD=||password|| CALLBACK='rwcp.or.jp> callme else\) 1 \(y/n\) y' export PHONE_NUMBER PPP_UID PPP_PASSWD PPP_HOST CALLBACK PPP_ABORT='ABORT BUSY' trcppp
Subroutine
#!/bin/sh
#
# Set up a PPP link
#
LOCKDIR=/var/spool/uucp
PPPDIR=/usr/lib/ppp
DEVICE=cua1
if [ -f $LOCKDIR/LCK..$DEVICE ]
then
echo "Unlocking PPP device..."
$PPPDIR/unlock LCK..$DEVICE
fi
$PPPDIR/fix-cua $DEVICE
(
stty 38400 -tostop
if $PPPDIR/chat -v -l LCK..$DEVICE $PPP_ABORT \
"" ATZ OK ATE1Q0V1X3S0=1DP$PHONE_NUMBER CONNECT "" ogin: $PPP_UID \
ssword: $PPP_PASSWD $CALLBACK \
rwcp.or.jp\> "exec /usr/local/etc/pppshell"
then
echo "OK chat" 1>&2
$PPPDIR/pppd -detach mru 1500 /dev/$DEVICE &
sleep 5
/sbin/route add -net 163.220.0.0 gw $PPP_HOST
exit 0
else
echo "PPP call failed" 1>&2
exit 1
fi
) < /dev/$DEVICE > /dev/$DEVICE