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

Re: dcfgtool and clones



On Sun, 1 Jun 1997, Lars Wirzenius wrote:

> Craig Sanders:
> > This is not only simple to implement, but it is also simple to
> > parse...
> 
> Not quite so simple. If you need to allow all characters in the
> values, which requires using escapes and stuff, and consequently
> also makes it more difficult to parse. The /bin/sh syntax is
> inadequate (the rules are way too complicated).

true, that's why i said my example would only work with simple
'name=value' assignments.

anything more complicated needs more work.

> Making it a requirement for the files to be parsable by the `.'
> (source) command in /bin/sh is a bad idea. If nothing else, it makes
> it complicated to have multiple locations for the data, and to change
> the locations.

> You want multiple locations, so that you can have a master database,
> shared by all nodes in a network, with local modifications overriding
> the master, as necessary.

This could be done using your favourite text processing tools (sed,
perl, m4, make, whatever) and rdist.

I don't agree that multiple locations are necessary - there's more than
one way to skin a cat.


> Having shell scripts run a `cfgtool' -like program is a much
> better idea. My implementation would work, mostly, but if another
> is used, I don't mind.

As long as the config database is editable with vi (or other text
editor), I don't mind.

As far as I am concerned, the file format can be anything that works as
long as I can still drive it from the command line over a ppp connection
and can write whatever sh, ed, sed, awk, or perl scripts i need to
automate modification of the file.

Craig

--
craig sanders
networking consultant                  Available for casual or contract
temporary autonomous zone              system administration tasks.

Reply to: