Subject: PPP again
To: Current Users <current-users@NetBSD.ORG>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: current-users
Date: 05/28/1996 12:51:40
Hello,m

Thanks to all who responded.  I have used some of the ideas to build my
own scripts now. ;-)

It seems that pppd will _always_ exit if the connect program fails, so
it is necessary to write a script which restarts pppd if it dies.

I also found out (by adding debug printf's to pppd source) why the new
pppd wasn't running the connect script.  Like I assumed, it blocked in
the open() call, waiting for CD.  This happened because pppd didn't read
my /etc/ppp/options.ttym1 file at all, so it didn't know I wanted it to
run chat.  Why?  Well, I start pppd from a different tty line than what
I want pppd to use.  I thought pppd would read the config file for the
tty line I specify on the pppd command line - but it doesn't.  If I say
'pppd /dev/ttym1 38400' on ttyp1, pppd will try to read the config from
/etc/ppp/options.ttyp1, which doesn't exist.  I don't know why pppd has
been designed to work like this (I consider this a bug :-)  Now I have
to specify _all_ pppd options on the command line, so they are always
visible in a ps auxww listing (which I don't like).

I guess this is not a problem for people who run only one PPP because
you can then put all the options in /etc/ppp/options - but if you want
to run multiple PPP links, you need to use /etc/ppp/options.ttyname
(which won't work unless you first log in via that tty and start pppd
there).

Is there a way to NOT specify the options on the command line?  At least,
the man page should clearly say how pppd works.  I had no idea it wasn't
reading my /etc/ppp/options.ttym1 at all (the old pppd version DID read
the config file!).

I still don't know how to monitor the pppd internals (whether the packet
prioritizing (is that a word? :) works etc).

  -jm

-- 

                     ---> http://www.jmp.fi/~jmarin/ <---