*BSD News Article 37776


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!news.mtu.edu!lisa.acs.nmu.edu!bart.acs.nmu.edu!not-for-mail
From: scottr@bart.acs.nmu.edu (Scott Reynolds)
Newsgroups: comp.os.386bsd.questions
Subject: Re: PPP for BSD? [ppp-2.1.2]
Date: 11 Nov 1994 15:11:29 -0500
Organization: Northern Michigan University
Lines: 37
Message-ID: <3a0j5h$ahd@bart.acs.nmu.edu>
References: <39imde$5hj@case.cyberspace.com> <39kb5r$e5@deanstoy.Stanford.EDU> <RICK.94Nov9150356@vox.trystero.com> <RICK.94Nov11114322@vox.trystero.com>
NNTP-Posting-Host: bart.acs.nmu.edu

In <RICK.94Nov11114322@vox.trystero.com>
	rick@vox.trystero.com (Richard E. Nickle) writes:

>   What I really want though, is a PPPD for FreeBSD that will redial the
>   modem after a hangup.  This is for a dedicated slip connection.  I can
>   see some ways that I can hack it up to do this, just wondering if someone
>   already has been through this.  

>I haven't gotten the auto-redial fixed yet.  What I've done is written a
>script to do this.  Not what I wanted, but will do until I can figure out
>what's funky about pppd doing 'persist'.

I've been using pppd with init(8) under NetBSD, and it occurs to me that
this would be an excellent way to make sure the connection was kept alive.
The "connect" option would have to have a script that included a sleep on
fail, of course, but otherwise this would work, wouldn't it?  Turning the
port on on off would then be a matter of modifying /etc/ttys and a
kill -HUP 1.

from /etc/ttys:

tty00 "/usr/sbin/pppd tty00 9600" none on

with an appropriate /etc/ppp/options, of course, that went something like
this:

connect "/etc/ppp/dial"
crtscts
mru 1064
defaultroute

/etc/ppp/dial would simply be a shell script that did chat && exit 0;
sleep 60; exit 1, or something similar.  (Example scripts and options for
chat are in the man page for the same.)

I haven't tried this, so your mileage may vary, but I can't see why it
wouldn't work.