-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roy Marples wrote: >>> 0_config_eth0="1.2.3.4 netmask 5.6.7.8;" >>> 1_config_eth0="\*" >>> 2_config_eth0="'host.name' netmask 1.2.3.4" >>> 3_config_eth0="-I 'option; $FOO with spaces'" >> I was hoping for some sort of meaningfully named separate variables, not >> an even messier fake array. > > I'm all ears for any other suggestions :) >
If there is some problem with this suggestion feel free to shoot it full of holes, but how about something like: address_eth0="1.2.3.4" netmask_eth0="255.255.255.0" broadcast_eth0="1.2.3.255" gateway_eth0="1.2.3.1" network_eth0="1.2.3.0" hostname_eth0="mypc" options_eth0="bells and whistles" Without digging through the original source I'm not sure what everything else in that array is, but I think you get the picture. Instead of sticking all these parameters into a big array why not break them down into what they actually are used for? This should also make the code that actually reads back these variables a lot more readable - instead of wondering what the 5th field in the array is you would see something meaningful like "netmask". Again, if I'm missing some reason why this wouldn't work feel free to point it out. :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHIb6OG4/rWKZmVWkRAhvzAJ0eoNK8I73+HU3tVRnJzFMJwYKSqQCgqzoW j71E+DxgfrGTRSwKWgCmW40= =qitq -----END PGP SIGNATURE-----
smime.p7s
Description: S/MIME Cryptographic Signature