Scripts and programs that need to operate on a variety of data or with different parameters should retrieve all variable information via metadb.
The special key
is used to perform file inclusions:
allowing config files to ``inherit'' from other config files. Note that key-value pairs preceding an inclusion override any identical key in the included file.
keyword redirects a lookup for one key
by another lookup for
ALIAS key1 key2
keyword redirects a lookup for any key
to another lookup with the suffix replaced by
ALIAS_SUFFIX suffix1 suffix2
This is a convenient way to apply a string mapping to an entire family of keys. To avoid infinite recursions and ambiguities in matching keys, the prefix of the key that is matched by suffix1 must no contain any underscore characters.
Lines containing only whitespace or starting with a pound sign are ignored:
# this is a comment
There is also a primitive macro facility:
DEFINE string string2
causes string to be replaced by string2 in the output.
SDEFINE string comand arg1 arg2 ...
defines string as a macro expanding to the first line of output of command. This also allows ``importing'' environment variables:
SDEFINE MACHINE_TYPE printenv MACHINE_TYPE
(but note the expansion of macros inside the config file does not use dollar signs).
MDEFINE string key
defines string as a macro expanding to the result of looking up key using metadb itself in the current configuration file. This allows piecing together of strings from various key values, and other back-handed uses.
undoes the definition of string.
Macros are expanded in key values, include filenames, and the definitions of other macros (at the time of definition).