Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!ihnp4.ucsd.edu!agate!violet.berkeley.edu!jkh
From: jkh@violet.berkeley.edu (Jordan K. Hubbard)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: SLIP
Date: 28 Dec 1995 00:26:36 GMT
Organization: University of California, Berkeley
Lines: 46
Message-ID: <4bso7s$i03@agate.berkeley.edu>
References: <4bs789$60c@clarknet.clark.net>
NNTP-Posting-Host: violet.berkeley.edu
In article <4bs789$60c@clarknet.clark.net>,
Todd B. Blake <tblake@clark.net> wrote:
>I've run around my new FreeBSD system and found startslip for initiating
>SLIP connections. I've looked at the man pages, and for all I can find
>it does have no scripting feature, just a password and username command
Yeah, startslip is actually not well suited to applications where you have to
dial out. Fortunately, the slattach command is perfectly well suited for
this..
In my /etc/start_if.sl0 file, I have:
slattach -c -h -r /etc/ppp/slip-dial -s 115200 cuaa1
And for /etc/ppp/slip-dial, I have the following shell-script:
#!/bin/sh
#
#
# This program uses the chat program to (re)dial and connect back up to the
# SLIP host.
# Set PHONE to be the phone number (with any prefix digits or delays)
# USER to be the username
# PASSWORD to be the password (make sure this script isn't world readable!)
# DEVICE to be the /dev/${DEVICE} file you wish to use
PHONE=5551212
USER=slipuser
PASSWORD=mypassword
DEVICE=cuaa1
# XXX - As it stands now, we try to dial the remote site every 10 seconds
# or so until it answers. It would be better to have an exponential
# backoff algorithm, but this way is much easier to write and guarantees
# a connection as soon as one is available.
# Wait just a little for the line to settle down
sleep 2
( if chat -v ABORT "NO CARRIER" ABORT BUSY "" ATH OK ATD$PHONE CONNECT "\r\r" og
in:--ogin: $USER ssword: \\q$PASSWORD
then
exit 0
else
exit 1
fi )