From owner-freebsd-rc@FreeBSD.ORG Mon Feb 24 04:00:32 2014 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32A70FA; Mon, 24 Feb 2014 04:00:32 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A18DB1AE1; Mon, 24 Feb 2014 04:00:31 +0000 (UTC) Received: from alph.d.allbsd.org (p2106-ipbf2009funabasi.chiba.ocn.ne.jp [114.146.169.106]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id s1O4068I030555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Feb 2014 13:00:17 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.7) with ESMTP id s1O404vU028145; Mon, 24 Feb 2014 13:00:05 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 24 Feb 2014 12:59:55 +0900 (JST) Message-Id: <20140224.125955.1719844232391066.hrs@allbsd.org> To: dteske@FreeBSD.org Subject: Re: network.subr _aliasN handling From: Hiroki Sato In-Reply-To: <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org> References: <11c101cf2f6b$e3aee5d0$ab0cb170$@FreeBSD.org> <20140222.141935.520275210006153242.hrs@allbsd.org> <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Feb_24_12_59_55_2014_506)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Mon, 24 Feb 2014 13:00:19 +0900 (JST) X-Spam-Status: No, score=-94.3 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: jhellenthal@dataix.net, rc@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 04:00:32 -0000 ----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit wrote in <122101cf2f94$bfd81b30$3f885190$@FreeBSD.org>: dt> > +list_vars() dt> > +{ dt> > + set | { while read LINE; do dt> > + var="${LINE%%=*}" dt> > + case "$var" in dt> > + "$LINE"|*[!a-zA-Z0-9_]*) continue ;; dt> > + $1) echo $var dt> > + esac dt> > + done; } dt> > +} dt> > dt> > This can be inconsistent with normalization of $_if in get_if_var() when dt> [.-/+] dt> > is included. dt> > dt> [Devin Teske] dt> dt> I'm not sure what you mean by "when [.-/+] is included". The line of code get_if_var() normalizes IF part in the variable name before eval: | _if=$1 | _punct=". - / +" | for _punct_c in $_punct; do | _if=`ltr ${_if} ${_punct_c} '_'` | done while list_vars ifconfig_${_if}_alias[0-9]\* does not. I think this breaks the following configuration, for example: ifconfig_bge0_name="ext.1" ifconfig_ext_1="inet 192.168.0.1/24" ifconfig_ext_1_alias0="inet 192.168.1.1/24" -- Hiroki ----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlMKw7sACgkQTyzT2CeTzy29hQCglSgjtkhnYxDkK7Lp2NskYiia 2JQAoI4XPAEzworkzwA/ogNY0GnOpDZU =Lwi5 -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Feb_24_12_59_55_2014_506)----