diff --git a/libifupdown/interface-file.c b/libifupdown/interface-file.c index 5508715..4eaedd1 100644 --- a/libifupdown/interface-file.c +++ b/libifupdown/interface-file.c @@ -123,14 +123,9 @@ lif_interface_file_parse(struct lif_dict *collection, const char *filename) while (*token) { if (!strcmp(token, "dhcp")) - { - cur_iface->is_dhcp = true; lif_interface_use_executor(cur_iface, "dhcp"); - } else if (!strcmp(token, "ppp")) - { lif_interface_use_executor(cur_iface, "ppp"); - } else if (!strcmp(token, "inherits")) { token = lif_next_token(&bufp); @@ -162,14 +157,10 @@ lif_interface_file_parse(struct lif_dict *collection, const char *filename) } /* pass requires as compatibility env vars to appropriate executors (bridge, bond) */ - if (!strcmp(executor, "dhcp")) - cur_iface->is_dhcp = true; - else if (!strcmp(executor, "bridge")) + if (!strcmp(executor, "bridge")) cur_iface->is_bridge = true; else if (!strcmp(executor, "bond")) cur_iface->is_bond = true; - else if (!strcmp(executor, "link")) - continue; lif_interface_use_executor(cur_iface, executor); } @@ -217,9 +208,7 @@ lif_interface_file_parse(struct lif_dict *collection, const char *filename) free(addon); /* pass requires as compatibility env vars to appropriate executors (bridge, bond) */ - if (!strcmp(addon, "dhcp")) - cur_iface->is_dhcp = true; - else if (!strcmp(addon, "bridge")) + if (!strcmp(addon, "bridge")) cur_iface->is_bridge = true; else if (!strcmp(addon, "bond")) cur_iface->is_bond = true; diff --git a/libifupdown/interface.c b/libifupdown/interface.c index c25591d..fe9acea 100644 --- a/libifupdown/interface.c +++ b/libifupdown/interface.c @@ -230,7 +230,6 @@ lif_interface_collection_inherit(struct lif_interface *interface, struct lif_dic return false; lif_dict_add(&interface->vars, "inherit", strdup(ifname)); - interface->is_dhcp = parent->is_dhcp; interface->is_bond = parent->is_bond; interface->is_bridge = parent->is_bridge; diff --git a/libifupdown/interface.h b/libifupdown/interface.h index a562d63..3f2c287 100644 --- a/libifupdown/interface.h +++ b/libifupdown/interface.h @@ -47,7 +47,6 @@ extern bool lif_address_unparse(const struct lif_address *address, char *buf, si struct lif_interface { char *ifname; - bool is_dhcp; bool is_auto; bool is_bridge; bool is_bond; diff --git a/libifupdown/lifecycle.c b/libifupdown/lifecycle.c index dc31474..d2a32e3 100644 --- a/libifupdown/lifecycle.c +++ b/libifupdown/lifecycle.c @@ -104,10 +104,7 @@ build_environment(char **envp[], const struct lif_execute_opts *opts, struct lif lif_environment_push(envp, "IFACE", lifname); lif_environment_push(envp, "PHASE", phase); lif_environment_push(envp, "MODE", mode); - - /* try to provide $METHOD for ifupdown1 scripts if we can */ - if (iface->is_dhcp) - lif_environment_push(envp, "METHOD", "dhcp"); + lif_environment_push(envp, "METHOD", "none"); if (opts->verbose) lif_environment_push(envp, "VERBOSE", "1");