Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 16:43:45 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        Andrew Reilly <areilly@bigpond.net.au>
Cc:        jkh@osd.bsdi.com, Cy.Schubert@uumail.gov.bc.ca, jar@integratus.com, jonathan@graehl.org, freebsd-arch@FreeBSD.ORG
Subject:   Re: configuration files, XML?
Message-ID:  <Pine.BSF.4.21.0103271626290.33348-100000@lion.butya.kz>
In-Reply-To: <20010327081943.EE95A37B718@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 Mar 2001, Andrew Reilly wrote:

> It ought to still be possible to define a libconfig API that
> contains a set of access mechanisms that provide the functionality
> required by the standard tools, if not necessarily the form.
> Trouble is that the initial, default implementation has to be
> clever/mangled enough that it can use the _existing_ gamut of
> /etc/foo.conf files and their formats as the repository, rather
> than getting the immediate bennefit of a grand unified format.

	Yes, this sounds like a right way to go. Initially libconfig will
contain many hacks (or just switches like h = cfg_open("/etc/blah.conf",
CFGT_SHELL_VARS)) to handle different formats of /etc/* files. It should
be possible to select for old or new config type for individual standard
files. All new programs (including ports) may support only new format(s).

	This way old unix gurus will be happy with old-style files, and
newbies may choose a new style (assuming that there will be a nice
utility with all sorts of buttons, lists etc.)

> For that much of the process, libconfig is likely to be a
> read-only API in most cases, with man/vi still the preferred write
> API.  At the very worst, it would consist of grabbing the existing
> config-file reading code from each application in turn, and
> whacking it so that the parsed results conform to the uniform
> in-memory structure, which the application is taught to use.

	There is already some standards like DOM. And the primary task for
configng will be design of libconfig API which should be flexible enough
to deal with different types of configuration files.

--
Boris Popov
http://www.butya.kz/~bp/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103271626290.33348-100000>