interface-file: add some backwards compatibility hacks with use (ref #3)

This commit is contained in:
Ariadne Conill 2020-07-24 04:37:14 -06:00
parent 8138ca8485
commit a3c138b9b2
3 changed files with 26 additions and 0 deletions

View file

@ -215,6 +215,14 @@ lif_lifecycle_run_phase(const struct lif_execute_opts *opts, struct lif_interfac
did_gateway = true;
}
else if (!strcmp(entry->key, "requires"))
{
if (iface->is_bridge)
lif_environment_push(&envp, "IF_BRIDGE_PORTS", (const char *) entry->data);
if (iface->is_bond)
lif_environment_push(&envp, "IF_BOND_SLAVES", (const char *) entry->data);
}
char envkey[4096] = "IF_";
strlcat(envkey, entry->key, sizeof envkey);