Subject: Re: PPP again
To: None <current-users@NetBSD.ORG>
From: Hiroyuki Ito <>
List: current-users
Date: 06/02/1996 09:48:24
Jukka Marin <> wrote:
> 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!).

% uname -srm
NetBSD 1.1B i386
% sed -n 177,181p /usr/src/usr.sbin/pppd/main.c
    if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
	!options_for_tty() ||
	!options_from_user() ||
	!parse_args(argc-1, argv+1))

1. /etc/ppp/options
2. /etc/ppp/options.ttyp1
3. ~/.ppprc
4. command line -- "/dev/ttym1 38400"

Perhaps you want:
    if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
	!options_from_user() ||
	!parse_args(argc-1, argv+1) ||

Good or bad, right or wrong, I'm not sure.

Hiroyuki Ito