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

Re: use and abuse of debconf

  Just a thought: What about having, for each kind of config file, a program
that converts it from and to an XML version, so:

# This is a comment
auto lo eth0

iface lo inet loopback

iface eth0 inet static
        up ifconfig eth0:0 netmask broadcast
        down ifconfig eth0:0 down

would become:

<comment>This is a comment</comment>

<iface name="lo" family="inet" method="loopback"/>

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



 This would provide:

  * A generic way to show hierarchical configuration data (I think that
    any config file can be expressed in an information tree).

  * A standard way to refer to a configuration option (xpath):
		/interfaces/iface[1] would access the first iface, and
		/interfaces/iface[2] the second.

  * The config file writer (and other tools) could easily created
    with XSLT.

Reply to: