Re: linux registry (no, not that again!)

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

 



On Thu, 2004-08-05 at 09:32, Alexandre Oliva wrote:
> On Aug  4, 2004, Kenneth Porter <shiva@xxxxxxxxxxxxxxx> wrote:
> 
> > --On Monday, August 02, 2004 2:46 AM -0300 Alexandre Oliva
> > <aoliva@xxxxxxxxxx> wrote:
> 
> >> Having e.g. /etc/sysconfig files changed to xml formats and having to
> >> parse that from init.d shell scripts certainly isn't going to make the
> >> system boot faster :-/
> 
> > For the kinds of things stored in sysconfig, would XML be that much
> > more complex?
> 
> How do you obtain the equivalent of `. /etc/sysconfig/whatever' from
> whatever.xml?
> 

It depends on what you are trying to do.

If you want to include something, it can be as simple as:

<include>
  <file> /etc/sysconfig/whatever </file>
  <file> /etc/sysconfig/somethingelse </file>
</include>

Then your XML loader looks for these elements to load additional
configuration.

Or, if you want to source environment, you could do something like:

<environment>
  <file mime-type='text/plain'> /etc/sysconfig/whatever </file>
  <file mime-type='text/xml'> /etc/sysconfig/morestuff.xml </file>
</environment>

If your included environment is in XML, you could even do things like:

<environment>
  <file mime-type='text/xml'> 
    <name> /etc/sysconfig/morestuff.xml </name>
    <xpath> /environment/local[@user='someone'] </xpath>
  </file>
</environment>

This would allow extraction of local, user-specific environments.

The possibilities are endless. As long as one doesn't over-use
structure, XML is no more difficult to parse than plain text. However,
it is far safer, far more likely to actually model the configuration
data structures, and has a quicker learning curve for humans looking
into the configuration for the first time.

-- 
Steve Brenneis <sbrenneis@xxxxxxxxx>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux