santiago at crfreenet.org
Thu Jan 19 13:00:06 CET 2017
On Wed, Jan 18, 2017 at 06:20:53PM +0100, Maximilian Wilhelm wrote:
> Are there any means to build something like that? Like having some
> defaults in the main config and re-set these values later on (in other
> config snippets)? If I would generate the defines by a script I would
> have some time where this part might be missing (like on first install)
> and my config would fail to load as the defines are referenced but not
Yes, defines are constants. There are some ugly tricks how to do that [*],
but i would strongly suggest just to ensure there is always a generated
script with defines.
Note that if the script referenced by include does not exist, config
also fails. That could be avoided by using wildcard in include.
[*] e.g. use function variables instead of constants:
val = 0;
or use that include may appear inside of expressions:
define val = (1 ~ [
(val is either false or true, depending of whether it expands to 1 ~ 
or 1 ~ [1, 0]; you would have to add comma to the value in included file)
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: Digital signature
More information about the Bird-users