1 |
On Fri, 2007-10-26 at 06:16 -0400, Richard Freeman wrote: |
2 |
> If there is some problem with this suggestion feel free to shoot it full |
3 |
> of holes, but how about something like: |
4 |
> |
5 |
> address_eth0="1.2.3.4" |
6 |
> netmask_eth0="255.255.255.0" |
7 |
> broadcast_eth0="1.2.3.255" |
8 |
> gateway_eth0="1.2.3.1" |
9 |
> network_eth0="1.2.3.0" |
10 |
> hostname_eth0="mypc" |
11 |
> options_eth0="bells and whistles" |
12 |
|
13 |
How would you construct that if you wanted to add 5 addresses to the |
14 |
interface? |
15 |
|
16 |
> Without digging through the original source I'm not sure what everything |
17 |
> else in that array is, but I think you get the picture. Instead of |
18 |
> sticking all these parameters into a big array why not break them down |
19 |
> into what they actually are used for? This should also make the code |
20 |
> that actually reads back these variables a lot more readable - instead |
21 |
> of wondering what the 5th field in the array is you would see something |
22 |
> meaningful like "netmask". |
23 |
|
24 |
We don't care what the actual options or values are, they are merely |
25 |
passed to ifconfig. Basically we need the equivalent of doing this |
26 |
|
27 |
ifconfig eth0 1.2.3.4 netmask 5.6.7.8 broadcast 1.2.3.4 |
28 |
ifconfig eth0 5.6.7.8 netmask 1.2.3.4 broadcast 5.6.7.8 |
29 |
ifconfig eth0 maybe some undocumented command |
30 |
|
31 |
And we do this with a few other tools as well. Lets take a list of |
32 |
preferred wireless AP's to connect to. How would you have that? As the |
33 |
only invalid character in an SSID is a NULL (daft, but I didn't write |
34 |
the specification) |
35 |
|
36 |
Thanks |
37 |
|
38 |
Roy |
39 |
|
40 |
-- |
41 |
gentoo-dev@g.o mailing list |