Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Problem with PPPD dial script(s)
Date: 10 Jul 1996 18:13:12 +0100
Organization: Coverform Ltd.
Lines: 60
Message-ID: <4s0ob8$9n@anorak.coverform.lan>
References: <HUFF.96Jul7001252@sunspot.tiac.net> <4rrf2f$fg@anorak.coverform.lan> <4ruq0b$or7@cronkite.cisco.com>
NNTP-Posting-Host: localhost.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]
Tim Iverson (iverson@cisco.com) wrote:
: In article <4rrf2f$fg@anorak.coverform.lan>,
: Brian Somers <brian@awfulhak.demon.co.uk> wrote:
: |Robert Huff (huff@sunspot.tiac.net) wrote:
: |: I'm setting up kernel PPP and the sample scripts provided in
: |: the Handbook don't work.
: |
: |This is one of the reasons I stopped using it. ijppp (prog: ppp)
: |is infinitely better - it dials, allows auto-connection, firewalling
: |etc. I'd advise this approach.
: Hmmm. Iijppp is easier to play with for simple setups, but it has serious
: drawbacks. The biggest being that it never execs another program to do
: anything for it -- everything must be done from within iijppp's own internal
: scripting language. I need to configure NAT from a dynamically assigned IP
: when I dial up. Can't do this with iijppp.
I want to do such things too. I have patched ppp so that it runs
/etc/ppp/ppp.etherup after connecting.
: |ijppp allows you to run "chat" from within the program (fork/exec).
: |Here, chat inherits the serial descriptors, reads & writes the necessary
: No. At least not in the 2.1-release that I have. Take a look at the
: source; iijppp never calls the chat program. Instead, some of the source
: code from chat was copied into iijppp. IMHO, this is poor engineering and
: a major design flaw -- always use an existing tool unless there is some
: large gain to be made by not doing so.
: BTW, the documentation does say that iijppp fork/execs chat. It lies. ;-)
I agree - sorry for the mis-information, I *assumed* that ppp was doing
the correct thing.
: |If you *really* have a good reason for not using ijppp, the only
: |satisfactory way I found was to get your modem not to drop carrier
: |on loss of DTR for a long time (say 255 hundreths of a second).
: |You can then write a script that kermits, then *immediately*
: |runs pppd. As long as pppd re-opens the line within your 2.55
: |second limit, you keep carrier.
: Umm, no. Open the line, run chat, run pppd, close line. If you need
: special dialing, use xchat from tUUCP (it can do anything). Documentation
: seems to indicate that pppd can open the line and then run chat for you,
: but none of the example scripts use this capability.
Oops, you're right again. I'm sure that when I first did this nasty
hack, pppd insisted on opening the serial device itself - without any
O_NONBLOCK flag.
So, a script that says
( chat .....; pppd .... ) </dev/cuaa0 >&0 2>/tmp/ppp.err &
should do the trick.... Nice one - although you won't get a nice
uucp lock file (will you?).
--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....