[PATCH] Gate boolean protocol options on filename.
Ondrej Zajicek
santiago at crfreenet.org
Fri Jul 29 12:43:16 CEST 2016
On Thu, Jul 28, 2016 at 11:09:08AM -0700, João Taveira Araújo wrote:
> Hi,
>
> Any feedback on this?
Hi
Although i agree that we should have better ways to control BIRD
programmatically, this feature seems to me like too specific and too
bizarre.
I see at least two alternatives already awailable:
1) Use include directive in the usual way (so you would have to use file
cointaining "disabled;" or appropriate option instead of empty file). If
you want to treat non-existing files as no change, then just add '*'
at the end of the file name.
2) Note that include directive looks like regular configuration statement,
but it is not. It is more like preprocessor directive and can be used
even inside other statements, like:
protocol ... {
disabled
include "xxx.conf";;
}
Then file xxx.conf should contain just the value (yes or no). This
approach can be used with any kind of option and seems like more generic
and more natural approach than gated boolean options.
Note that include has to be on separate line to be parsed correctly and
there has to be two semicolons (first for include, second for the
option). This is something that we will probably address in future
version (so that 'disabled include "xxx.conf";' would be enough).
--
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...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160729/4dd4c7cb/attachment.asc>
More information about the Bird-users
mailing list