From owner-freebsd-rc@FreeBSD.ORG Sat Feb 11 02:00:21 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 77CED106564A; Sat, 11 Feb 2012 02:00:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-150-251.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B3F4D14D86F; Sat, 11 Feb 2012 02:00:20 +0000 (UTC) Message-ID: <4F35CBB3.2040501@FreeBSD.org> Date: Fri, 10 Feb 2012 18:00:19 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0) Gecko/20120201 Thunderbird/10.0 MIME-Version: 1.0 To: Hiroki Sato References: <4F2F442F.3030509@erdgeist.org> <20120207.064701.1809281571072237708.hrs@allbsd.org> <4F304F54.4020802@FreeBSD.org> <20120207.072925.1861639312875773760.hrs@allbsd.org> In-Reply-To: <20120207.072925.1861639312875773760.hrs@allbsd.org> X-Enigmail-Version: 1.3.5 OpenPGP: id=1A1ABC84 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig4B9430026FBF171FCB60DC28" Cc: freebsd-rc@FreeBSD.org Subject: Re: Proposal ipv6_addrs_common X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 11 Feb 2012 02:00:21 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4B9430026FBF171FCB60DC28 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/06/2012 14:29, Hiroki Sato wrote: > Doug Barton wrote > in <4F304F54.4020802@FreeBSD.org>: >=20 > do> On 02/06/2012 13:47, Hiroki Sato wrote: > do> > It actually depends on the newline > do> > do> That's way too fragile, as users are likely to put them all in one = line > do> since shell syntax doesn't differentiate (assuming non-wacky values= of IFS). >=20 > I don't think so. In this syntax a newline character is a separator > distinguished from normal white spaces by read statement. >=20 > do> > echo "$foo" | while read L; do echo $L; done Ok, I was looking only at what you wrote in your last message, I forgot what you're trying to accomplish. Having thought more about this I still think that using rc.conf variables for this is too fragile. Rather than introducing a new format for rc.conf stuff what do you think about putting the new mechanism in its own file? That way you can still use while/read to easily suck in the free-form configuration stuff without creating something new for rc.conf itself. I'm thinking something along the lines of a default name of /etc/ifconfig.$if, and the network.subr bits could do something like this= : if [ -n "$ifconfig_$IF" ]; then elif [ -s "/etc/ifconfig.$IF" ]; then while read line ... fi You can add refinements such as if ifconfig_$IF contains a path name that you use that file instead. Doug --=20 It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ --------------enig4B9430026FBF171FCB60DC28 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJPNcuzAAoJEFzGhvEaGryEgZwH/AuktusEmp/4qi7QAUCXSA8L gamwZi9r2tJuhFkaOYR27s4ExRvtl/KyOOX2LiJ2Snr0HLbgFT54f9ugDOf+8Z0R l0rSKWzGansmuyM2WIlstG90IrsWztD71szJWeIRiMEApHtpfkLy4nkItObDpVvR V6zyKtyrqDNQCfZd1+3N6JutAge+rKo+BrdOF8wSLYhnDfWQrVizgKjoTZxPB4dP 78ztZfWPNoXG0gHRBD5erIw3uo9EbuZGM4jTwof2ui0KehOVDiv3cL4g63VMhuk7 o52D2YQn0muji03FAaISF+j8VmLEVdl/HfBLs8+HJi4ObEOPW6YeGX1zxkCsiVU= =zC1s -----END PGP SIGNATURE----- --------------enig4B9430026FBF171FCB60DC28--