From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 7 16:11:35 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 806C3106567E; Fri, 7 Mar 2008 16:11:35 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 203138FC2B; Fri, 7 Mar 2008 16:11:34 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.1/8.13.8) with ESMTP id m27FnqBx045475; Fri, 7 Mar 2008 09:49:52 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.2/8.14.2/Submit) id m27FnqiJ045474; Fri, 7 Mar 2008 09:49:52 -0600 (CST) (envelope-from brooks) Date: Fri, 7 Mar 2008 09:49:52 -0600 From: Brooks Davis To: usselmann.m@icg-online.de Message-ID: <20080307154951.GB34313@lor.one-eyed-alien.net> References: <200803071133.m27BXoXH096841@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline In-Reply-To: <200803071133.m27BXoXH096841@freefall.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 07 Mar 2008 09:49:52 -0600 (CST) Cc: freebsd-bugs@freebsd.org, freebsd-rc@freebsd.org Subject: Re: conf/121452: /etc/rc.d/ppp not working as expected X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 16:11:35 -0000 --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The following patch should allow profile name to contain ".-/+" characters as we do with interfaces. It also documents the previous undocumnted per-profile overrides of _mode and _nat which were the cause of the problem. If someone who uses ppp could test this, I'd be happy to commit it. -- Brooks Index: etc/rc.d/ppp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/etc/rc.d/ppp,v retrieving revision 1.16 diff -u -p -r1.16 ppp --- etc/rc.d/ppp 26 Jan 2008 14:02:19 -0000 1.16 +++ etc/rc.d/ppp 7 Mar 2008 15:42:29 -0000 @@ -21,17 +21,22 @@ ppp_start_profile() local _ppp_profile _ppp_mode _ppp_nat =20 _ppp_profile=3D$1 + _ppp_profile_cleaned=3D$1 + _punct=3D". - / +" + for _punct_c in $_punct; do + _ppp_profile_cleaned=3D`ltr ${_ppp_profile_cleaned} ${_punct_c} '_'` + done =20 # Check for ppp profile mode override. # - eval _ppp_mode=3D\$ppp_${_ppp_profile}_mode + eval _ppp_mode=3D\$ppp_${_ppp_profile_cleaned}_mode if [ -z "$_ppp_mode" ]; then _ppp_mode=3D$ppp_mode fi =20 # Check for ppp profile nat override. # - eval _ppp_nat=3D\$ppp_${_ppp_profile}_nat + eval _ppp_nat=3D\$ppp_${_ppp_profile_cleaned}_nat if [ -z "$_ppp_nat" ]; then _ppp_nat=3D$ppp_nat fi Index: share/man/man5/rc.conf.5 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.335 diff -u -p -r1.335 rc.conf.5 --- share/man/man5/rc.conf.5 5 Mar 2008 18:32:58 -0000 1.335 +++ share/man/man5/rc.conf.5 7 Mar 2008 15:42:29 -0000 @@ -1315,11 +1315,30 @@ If set to run the .Xr ppp 8 daemon. +.It Va ppp_profile +.Pq Vt str +The name of the profile to use from +.Pa /etc/ppp/ppp.conf . +Also used for per-profile overrides of +.Va ppp_mode +and +.Va ppp_nat . +When the profile name contains any of the characters +.Dq Li .-/+ +they are translated to +.Dq Li _ +for the proposes of the override variable names. .It Va ppp_mode .Pq Vt str Mode in which to run the .Xr ppp 8 daemon. +.It Va ppp_ Ns Ao Ar profile Ac Ns _mode +.Pq Vt str +Overrides the global +.Va ppp_mode +for +.Ar profile . Accepted modes are .Dq Li auto , .Dq Li ddial , @@ -1336,10 +1355,12 @@ Used in conjunction with .Va gateway_enable allows hosts on private network addresses access to the Internet using this host as a network address translating router. -.It Va ppp_profile +.It Va ppp_ Ns Ao Ar profile Ac Ns _nat .Pq Vt str -The name of the profile to use from -.Pa /etc/ppp/ppp.conf . +Overrides the global +.Va ppp_nat +for +.Ar profile . .It Va ppp_user .Pq Vt str The name of the user under which --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFH0WQfXY6L6fI4GtQRAno7AKDUKp8JMzfetCCeIcFaHJbG5XpsVwCcCupa TGmfIAueZeE7VGPR6vR/TBk= =qnXT -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8--