Subject: Re: PPP again
To: Jukka Marin <jmarin@pyy.jmp.fi>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 05/28/1996 15:50:11
>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.

Since this _is_ on current-users, I assume you're running -current.
Correct?  If so, then you can use the "persist" option to not have
pppd exit if the connect script fails, and also if the connection drops.
No need to wrap it in a script.  If you want a delaying time between
retries, check out the "holdoff" option.

>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).
>[...]
>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 got bit by this as well.  I suspect that this behavior is because pppd
can be used for dial-ins, and it automatically figures out what tty
you're on so it can just use options for each tty.  But I'm not so crazy
about this feature as it's implemented -- I wish the device name would
override this.

You can, however, specify all your options in a file, and use the "file"
argument to read in those files.  For example, my pppd startup looks
like:

/usr/sbin/pppd file /etc/ppp/options.nrl

And that avoids the huge monster command line that I used to have :-)

--Ken