PPPの設定
インターネットプロバイダの AIA net
に加入しています。
その設定内容です。
ppp-on
#!/bin/sh
LOCKDIR=/var/spool/uucp
DEVICE=cua1
PHONE=********** <=電話番号
USER=******** <=アカウント
PASSWORD=******** <=パスワード
if [ -f $LOCKDIR/LCK..$DEVICE ]
then
echo "PPP device is locked"
exit 1
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 ATDP$PHONE CONNECT "" ogin: $USER ssword: $PASSWORD
then
/usr/lib/ppp/pppd -detach mru 1500 /dev/$DEVICE +ua /home/ppp/aianet &
sleep 10
exit 0
else
echo "PPP call failed" 1>&2
exit 1
fi
) < /dev/$DEVICE > /dev/$DEVICE
ppp-off
#!/bin/sh
DEVICE=ppp0
PORT=cua1
#
# 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"
/usr/lib/ppp/unlock LCK..$PORT
exit 0
fi
#
# The link is not active
#
echo "$DEVICE link is not active"
exit 1
/home/ppp/aianet
******* <=アカウント
******* <=パスワード
/etc/resolv.conf
nameserver ***.***.***.*** <=DNSのIPアドレス
/etc/ppp/options
crtscts
modem
defaultroute
noipdefault
debug