Merge pull request #122 from ifupdown-ng/feature/configure-auto-executor-selection
Feature/configure auto executor selection
This commit is contained in:
commit
d250ab213c
7 changed files with 37 additions and 8 deletions
|
|
@ -21,6 +21,7 @@
|
|||
struct lif_config_file lif_config = {
|
||||
.allow_addon_scripts = true,
|
||||
.allow_any_iface_as_template = true,
|
||||
.auto_executor_selection = true,
|
||||
.compat_create_interfaces = true,
|
||||
.compat_ifupdown2_bridge_ports_inherit_vlans = true,
|
||||
.implicit_template_conversion = true,
|
||||
|
|
@ -49,6 +50,7 @@ set_bool_value(const char *key, const char *value, void *opaque)
|
|||
static struct lif_config_handler handlers[] = {
|
||||
{"allow_addon_scripts", set_bool_value, &lif_config.allow_addon_scripts},
|
||||
{"allow_any_iface_as_template", set_bool_value, &lif_config.allow_any_iface_as_template},
|
||||
{"auto_executor_selection", set_bool_value, &lif_config.auto_executor_selection},
|
||||
{"compat_create_interfaces", set_bool_value, &lif_config.compat_create_interfaces},
|
||||
{"compat_ifupdown2_bridge_ports_inherit_vlans", set_bool_value, &lif_config.compat_ifupdown2_bridge_ports_inherit_vlans},
|
||||
{"implicit_template_conversion", set_bool_value, &lif_config.implicit_template_conversion},
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
struct lif_config_file {
|
||||
bool allow_addon_scripts;
|
||||
bool allow_any_iface_as_template;
|
||||
bool auto_executor_selection;
|
||||
bool compat_create_interfaces;
|
||||
bool compat_ifupdown2_bridge_ports_inherit_vlans;
|
||||
bool implicit_template_conversion;
|
||||
|
|
|
|||
|
|
@ -216,6 +216,9 @@ handle_generic(struct lif_interface_file_parse_state *state, char *token, char *
|
|||
|
||||
lif_dict_add(&state->cur_iface->vars, token, strdup(bufp));
|
||||
|
||||
if (!lif_config.auto_executor_selection)
|
||||
return true;
|
||||
|
||||
/* Check if token looks like <word1>-<word*> and assume <word1> is an addon */
|
||||
char *word_end = strchr(token, '-');
|
||||
if (word_end != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue