System Configuration

JD Runyan Jason.Runyan at nitckc.usda.gov
Fri Feb 8 21:16:43 CST 2002


On Fri, Feb ,  at 02:37:52PM -0600, Brian Densmore wrote:
> > -----Original Message-----
> > From: Tony Hammitt [mailto:tony at speedscript.com]
> > Sent: Friday, February 08, 2002 1:44 PM
> > To: Brian Densmore
> > Cc: kclug at kclug.org
> > Subject: Re: System Configuration
> > 
> > 
> > I was talking about using Python for the configuration parameter files
> > themselves.  Like /etc/xinetd.conf etc. would become:
> oh. 
> 
> Well, yes that's interesting. The config files are currently called with
> bash right, or directly read by the programs. So you're talking about
> changing the behavior of some of the programs?
> Maybe I'm not understanding you, it's been a hellish week and my brain
> is fried.
> 
> Yes, this is a -=massive=- project.
> 
> If we need to change code, it may be very difficult to get buy in from
> the various developers. They are a very sensitive lot. ;')
> Of course once we figure out how to do it. It'll be easy to convert new
> releases.
> 
> I still think it is a great idea.
>
This would be a massive project.  I would approach it by creating an api 
to handle config files, then I would pick an app, and figure out how to 
patch it to access the new api.  The api should parse the files, preferably
using a mini-python parser, and then "publish" them with a standard interface 
for the calling application to use.  You would then just need to edit the code
in the applications to call your library, and request the values it needs.  The
functions would be the essentially the same, except when they go to look at the
file it would call the library instead.  It sounds simpler than it is in practice.
The chief benefit I would see to using a scripting language for configs, is 
the ability to use control statements to essentially create a dynamic config
to use on multiple varied hosts.

You could also achieve a similiar result writing the api, and then running a 
script at startup that writes out the config files in the vendors format.  All
you would have to do is write the config script, and then run it to output the 
new configuration
-- 
JD Runyan
		"You can't milk a point."
			David M. Kuehn, Ph.D.




More information about the Kclug mailing list