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 <interface> <setting1> [..<settingN>] 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/ -- [EMAIL PROTECTED] mailing list