[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using XML to handle all configuration files

>>>>> "Nicolás" == Nicolás Lichtmaier <nick@debian.org> writes:

    >> For that matter, compare it with the original style
    >> interfaces # This is a comment auto lo auto inet auto loopback
    >> iface lo inet loopback iface eth0 inet static address
    >> network netmask broadcast
    >> gateway
    >> And consider that you dont have to do stupid things like match
    >> ((()))))) and you can simply use # as God intended.  I prefer
    >> the current style to either of the two proposed alternatives.

    Nicolás>  Are the multiple "stanzas" separated with whitespace? 
    Nicolás> With the words iface| auto... how do I merge lines? could
    Nicolás> I put address and netork in the same line? Now we want to
    Nicolás> handle aliases... we need to code a way to handle aliases
    Nicolás> lists (and invent a syntaxis). How do I safely
    Nicolás> modify/check this file with a script?

Perhaps that is a bad example because aliases are handled as separate
interfaces (you could of course argue that this isn't a good

Perhaps this might be a better example:

# iface eth0 inet static
#     address
#     network
#     netmask
#     broadcast
#     up route add -net netmask gw
#     up route add default gw
#     down route del default gw
#     down route del -net netmask gw

Wouldn't this be better?

<iface name="eth0" family="inet" method="static">

That way, any program that looks at this file can understand
the routes, and not have to parse the command line for route.

Something else you could look at along these lines: firewall rules
associated with a particular interface. This requires solving a number
of issues though, so I won't attempt it here.
Brian May <bam@debian.org>

Reply to: