DragonFly BSD
DragonFly kernel List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: configuration files


From: Galen Sampson <galen_sampson@xxxxxxxxx>
Date: Thu, 11 Dec 2003 12:44:17 -0800

Matthew Dillon wrote:
    I personally prefer NOT to use XML for something like this.  I just
    don't see the point... all it does is add reams of API junk that all
    devolve down into accessing some variable or other.

I have 3 bsd machines at home. I want to be able to manage all of them as easy as I manage 1. The scripts that you wrote for diskless boot is a good idea. It has some drawbacks. You can only do a full override of an entire file. You mention the ability to do sh programming in rc.conf, and this could be used to get around doing a full override but that isn't a great option. I want to be able to have a set of default variables for all machines. I want to then be able to modify only the variables I need to override. If I did this with sh if [ ... ] the rc.conf file would get complex and ugly. Then there is the option to put each .conf file in /etc/rc.d/*. So /etc/rc.d/sendmail.conf for instance. I've looked and I think rcng is set up this way already. XML would solve the problem of setting specific variables in a file, no matter what order the variables are listed. XML also has an import statment so you wouldn't need to use cpp to import separate files.


I have tried putting my config files in cvs. Then I try to merge the default file into the machine specific override. I didn't get it working right. I didn't know about the Infrastructure project http://www.infrastructures.org. The fact that my idea is not unique is a good thing. Maybe they solved some of my problems already.

The /bin/sh variable=data form is probably as powerful a mechanism as
we would ever need, especially when combined with autoconf-like mechanisms
such as, for example, access to the DHCP variable space. In fact, it
occurs to me that we could augment 'kenv' to allow setting kernel env variables in addition to retrieving them and use the space to store
DHCP and/or autoconf variables. That would be pretty damn cool. Then
/etc/rc.conf could be trivially conditionalized.



What are autoconf variables? Variables obtained automatically I guess (not the autoconf build system). What else provides this besides DHCP?


Regards,
Galen




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