In article <[log in to unmask]>,
[log in to unmask] (James Taylor) wrote:
>Is there a FAQ or thread on configuring Linux boxes for dial-up to MUNet?
Not yet. I was thinking about producing one at the beginning of last
semester, but there really didn't seem to be much interest.
However, yours is the second request I've seen today, so I think I'll go
ahead and write one up, and ask someone to add it to the MUnet page
< http://www.muohio.edu/munet/ >. It'll take me a couple days, so until
then, here are some key files:
First, here's the script I use to initiate a PPP connection:
#!/bin/sh
# /usr/local/sbin/ppp-on
# Sets up a ppp connection over a modem line
PPPDIR=/usr/sbin
# There used to be a bunch of device-locking stuff in here, but it broke
# when I upgraded pppd, and I never bothered to fix it.
# Start ppp daemon using chat to connect
$PPPDIR/pppd 115200 connect '$PPPDIR/chat -f /etc/ppp/chat-script'
--
Here's the script I use to end a PPP connection:
#!/bin/sh
# /usr/local/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
--
Here's my PPP options file (not too complicated):
# /etc/ppp/options
defaultroute mru 1500 /dev/modem
--
Here's the chat script that dials up (I scripted a terminal login, because
with `chat -v', I can get more detailed logging if the session fails).
Oh, and when my modem connects to another modem, it usually spits out
`ARQ' in the connection message -- you'll want to change `ARQ' to
something that your modem says when it connects:
# /etc/ppp/chat-script
"" ATZ OK ATDT5230003 ARQ\r \d\d\d\n rname: uniqueid ssword: \
yerpasswd TIMEOUT 120
--
Here's a script that gets run every time you make a PPP connection, no
matter what script you're using -- this is good for making system file
modifications, notifying people of what your IP address is, etc. BTW, I
call my machine soliton:
#!/bin/sh
# /etc/ppp/ip-up
# make the /etc/hosts file current, so that talk & other things work
echo "127.0.0.1 localhost" > /etc/hosts
echo "$4 soliton.mcs.muohio.edu soliton" >> /etc/hosts
# run a script to update a web page with our new IP address
sh /usr/local/sbin/notify-up
# mail our new IP address to me
echo $4 | mail -s "soliton's IP" [log in to unmask]
--
And finally, here's a script that gets run whenever your PPP connection
goes down:
#!/bin/sh
# /etc/ppp/ip-down
echo "127.0.0.1 localhost soliton.mcs.muohio.edu soliton" > /etc/hosts
--
Hope that's a good start! Look for more on the MUnet web page soon.
Clayton L. Hines [log in to unmask]
Unix Software Specialist Miami University, Oxford, OH, USA
|