Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 13:41:06 -0600
From:      Brooks Davis <brooks@freebsd.org>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        usselmann.m@icg-online.de, freebsd-bugs@freebsd.org, Brooks Davis <brooks@freebsd.org>, freebsd-rc@freebsd.org
Subject:   Re: conf/121452: /etc/rc.d/ppp not working as expected
Message-ID:  <20080307194106.GA47910@lor.one-eyed-alien.net>
In-Reply-To: <bb4a86c70803071043i6f8cad26ped91f545354b8809@mail.gmail.com>
References:  <200803071133.m27BXoXH096841@freefall.freebsd.org> <20080307154951.GB34313@lor.one-eyed-alien.net> <bb4a86c70803070934r2d736cebp1f3ece888c9ea14a@mail.gmail.com> <20080307180907.GA45978@lor.one-eyed-alien.net> <bb4a86c70803071043i6f8cad26ped91f545354b8809@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 07, 2008 at 10:43:26AM -0800, Maksim Yevmenkin wrote:
> On Fri, Mar 7, 2008 at 10:09 AM, Brooks Davis <brooks@freebsd.org> wrote:
> > On Fri, Mar 07, 2008 at 09:34:06AM -0800, Maksim Yevmenkin wrote:
> >  > On Fri, Mar 7, 2008 at 7:49 AM, Brooks Davis <brooks@freebsd.org> wr=
ote:
> >  > > The following patch should allow profile name to contain ".-/+" ch=
aracters
> >  > >  as we do with interfaces.  It also documents the previous undocum=
nted
> >  > >  per-profile overrides of _mode and _nat which were the cause of t=
he problem.
> >  > >  If someone who uses ppp could test this, I'd be happy to commit i=
t.
> >  >
> >  > i'm not so sure about this one. if i have "t-dsl" as a profile name,=
 i
> >  > will not be able to specify any overrides for this profile, because
> >  > shell won't let me have "ppp_t-dsl_mode" and/or "ppp_t-dsl_nat"
> >  > variable. so, the translation here is not really needed, imo, and,
> >  > perhaps, could even be considered harmful. perhaps we should do one =
of
> >  > the following
> >
> >  The point of the patch is to change all ".-/+" characters to _ which
> >  means the variable will be ppp_t_dsl_(mode|nat) so you can use the
> >  profile overrides.  It's an exact copy of the code we use for interface
> >  variables.
>=20
> i get that. what i was trying to say is that overrides for the "t-dsl"
> profile (with hyphen) are now, obviously, "ppp_t_dsl_mode" and/or
> "ppp_t_dsl_nat".  to me, it is somewhat confusing. another (pretty
> weak :) argument is that all ".-/+" characters are mapped onto single
> "_"  character. this could potentially create a collision in variable
> names. i realize that you have done exactly the same thing as in
> get_if_var() in network.subr. are there any examples of network
> interface variable names that are not "shell clean"?

When I added the functionality it was to handle '.', but I figured I'd
add other common separators at the same time and figured collisions
aren't likely.  For other variables there may be argument for rejecting
values that aren't shell clean, but it's not clear to me how to write
such a shell function.  If someone could figure that out it would make a
good addition to rc.subr and I wouldn't mind taking that approach here.
I just figured that we've got precedent for the other approach.

-- Brooks

> >  > 1) demand that ppp profile names should be "shell clean" and documen=
t it
> >  >
> >  > or
> >  >
> >  > 2)  if a ppp profile name is not "shell clean" simply do not evaluate
> >  > profile overrides and use defaults
> >
> >  I'm opposed to 2.  I'd be OK with 1, but think folding common
> >  punctuation into _ may be a better option given that we're already doi=
ng
> >  it elsewhere.
>=20
> i'm still not sure :) however, please do not take it as an objection
> :) since we already have similar code (and no one, including me,
> complained :), it probably makes more sense to do the same here.
>=20
> thanks,
> max
>=20

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iD8DBQFH0ZpRXY6L6fI4GtQRAkLdAKDN1RritxuB1Ivd1lvsO0DMhX8Q6QCg1Cnt
BpByTzcoh+MIDZxUkKddDOU=
=FKZT
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080307194106.GA47910>