From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Im1st-0005nS-T0 for garchives@archives.gentoo.org; Sun, 28 Oct 2007 06:44:32 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9S6hfwJ006047; Sun, 28 Oct 2007 06:43:41 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9S6fp6X003739 for ; Sun, 28 Oct 2007 06:41:51 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8523165681 for ; Sun, 28 Oct 2007 06:41:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: 0.075 X-Spam-Level: X-Spam-Status: No, score=0.075 required=5.5 tests=[AWL=0.607, BAYES_00=-2.599, RCVD_NUMERIC_HELO=2.067] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6qOB1RNzvaXx for ; Sun, 28 Oct 2007 06:41:45 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id CF05C6565D for ; Sun, 28 Oct 2007 06:41:43 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Im1q6-00070x-Ra for gentoo-dev@gentoo.org; Sun, 28 Oct 2007 06:41:38 +0000 Received: from 81.168.44.118 ([81.168.44.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Oct 2007 06:41:38 +0000 Received: from slong by 81.168.44.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Oct 2007 06:41:38 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Steve Long Subject: [gentoo-dev] Re: Re: Opinions Wanted - Arrays again :) Date: Sun, 28 Oct 2007 06:46:08 +0000 Message-ID: References: <1193326831.4245.16.camel@uberlaptop.marples.name> <20071025213113.GJ29642@supernova> <1193348959.2910.9.camel@uberpc.marples.name> <20071025225641.GK29642@supernova> <1193380105.2913.1.camel@uberpc.marples.name> <4721BE92.4070200@thefreemanclan.net> <1193395366.4312.14.camel@uberlaptop.marples.name> <1193418183.3487.3.camel@uberpc.marples.name> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.168.44.118 User-Agent: KNode/0.10.4 Sender: news X-Archives-Salt: f9f99cab-27a8-4db0-8229-2d50e41aca55 X-Archives-Hash: 286fe02628375d0545aa3b58299bc50e Roy Marples wrote: > On Fri, 2007-10-26 at 16:36 +0000, Duncan wrote: >> Well, several services already have a "basic" setup using named vars, >> then something like Richard's suggested Options_eth0= as a (normally >> commented) catch-all for anything advanced that the admin wishes to pass >> "raw". IMO the standard network stuff is well defined enough for that, >> perhaps with a couple of mode-toggles and/or counters thrown in. (A >> counter like eth0_number_IPs= could default to one, for instance, but set >> to something higher and with the appropriate number of address_N_eth0= >> lines, it'd then cover your 5-address example, without having to worry >> about figuring out how many there are, since it's a given.) >> >> I think that's what many of us would like and what this subthread is >> asking for, truth be told, but I also realize it's going to be more work >> setting it up -- but OTOH should be simpler for the user to setup so >> perhaps less bugs to deal with and the documentation in the net sample >> file should be somewhat simpler as well. The more work thing is why I've >> not requested it before, but it'd be nice, and with others mentioning it >> now too, now's the time to speak up if I'm going to. =8^) > > Fair enough, but one of the goals of baselayout-2 is to support > baselayout-1 configs where possible if the shell is still bash. > > I'm striving to support similar configs for non bash shells so that > there's not much of a learning curve. > > Yes we could have a totally new non compatible setup, but that would > really suck hard for upgraders yes? > But baselayout knows if it's running BASH or not, right? Could you not define a new, easy to use setup while still allowing the old syntax for people who use BASH. (It could be an install option, with a script provided to convert configuration, if and when the user wanted to switch.) I must be missing something: why can this not just be mapped to a function call? So: config_eth0=( "1.2.3.4/24" "some voodoo" ) would become: netConfig eth0 "1.2.3.4/24" "some voodoo" ie the spec would be: netConfig [..] with a test for [ $# -gt 1 ] and then interface=$1; shift Failing that, a plaintext config file along the lines discussed in [1] would be cool. awk could parse it pretty quickly. [1] http://modeemi.fi/~tuomov/b//archives/2007/01/20/T11_58_29/ -- gentoo-dev@gentoo.org mailing list