Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Opinions Wanted - Arrays again :)
Date: Fri, 26 Oct 2007 16:39:48
Message-Id: pan.2007.10.26.16.36.06@cox.net
In Reply to: Re: [gentoo-dev] Opinions Wanted - Arrays again :) by Roy Marples
1 Roy Marples <uberlord@g.o> posted
2 1193395366.4312.14.camel@××××××××××××××××××.name, excerpted below, on
3 Fri, 26 Oct 2007 11:42:46 +0100:
4
5 > On Fri, 2007-10-26 at 06:16 -0400, Richard Freeman wrote:
6 >> [H]ow about something like:
7 >>
8 >> address_eth0="1.2.3.4"
9 >> netmask_eth0="255.255.255.0"
10 >> broadcast_eth0="1.2.3.255"
11 [...]
12 >> options_eth0="bells and whistles"
13 >
14 > How would you construct that if you wanted to add 5 addresses to the
15 > interface?
16
17 >> I think you get the picture.
18
19 > We don't care what the actual options or values are, they are merely
20 > passed to ifconfig. Basically we need the equivalent of doing this
21 >
22 > ifconfig eth0 1.2.3.4 netmask 5.6.7.8 broadcast 1.2.3.4
23 > ifconfig eth0 5.6.7.8 netmask 1.2.3.4 broadcast 5.6.7.8
24 > ifconfig eth0 maybe some undocumented command
25 >
26 > And we do this with a few other tools as well. Lets take a list of
27 > preferred wireless AP's to connect to. How would you have that? As the
28 > only invalid character in an SSID is a NULL (daft, but I didn't write
29 > the specification)
30
31 Well, several services already have a "basic" setup using named vars,
32 then something like Richard's suggested Options_eth0= as a (normally
33 commented) catch-all for anything advanced that the admin wishes to pass
34 "raw". IMO the standard network stuff is well defined enough for that,
35 perhaps with a couple of mode-toggles and/or counters thrown in. (A
36 counter like eth0_number_IPs= could default to one, for instance, but set
37 to something higher and with the appropriate number of address_N_eth0=
38 lines, it'd then cover your 5-address example, without having to worry
39 about figuring out how many there are, since it's a given.)
40
41 I think that's what many of us would like and what this subthread is
42 asking for, truth be told, but I also realize it's going to be more work
43 setting it up -- but OTOH should be simpler for the user to setup so
44 perhaps less bugs to deal with and the documentation in the net sample
45 file should be somewhat simpler as well. The more work thing is why I've
46 not requested it before, but it'd be nice, and with others mentioning it
47 now too, now's the time to speak up if I'm going to. =8^)
48
49 As for the wireless side, I've stuck to wired for all the usual reasons,
50 so don't even pretend to know anything about wireless, nor to offer any
51 sort of solution. Perhaps even if the standard networking is setup with
52 named vars, the wireless example you gave would be better left as
53 "arrays" of whatever form?
54
55 --
56 Duncan - List replies preferred. No HTML msgs.
57 "Every nonfree program has a lord, a master --
58 and if you use the program, he is your master." Richard Stallman
59
60 --
61 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: Opinions Wanted - Arrays again :) Roy Marples <uberlord@g.o>