From: Felix Fietkau Date: Mon, 21 Apr 2014 17:11:34 +0000 (+0200) Subject: config: add support for disabling interfaces X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b3e96c491d6929a518ac2216d93c3dbcfa9bb1a;p=oweals%2Fnetifd.git config: add support for disabling interfaces Signed-off-by: Felix Fietkau --- diff --git a/config.c b/config.c index 14a91a5..1d04efd 100644 --- a/config.c +++ b/config.c @@ -56,11 +56,15 @@ static void config_parse_interface(struct uci_section *s, bool alias) { struct interface *iface; - const char *type = NULL; + const char *type = NULL, *disabled; struct blob_attr *config; struct device *dev; bool bridge = false; + disabled = uci_lookup_option_string(uci_ctx, s, "disabled"); + if (disabled && !strcmp(disabled, "1")) + return; + blob_buf_init(&b, 0); if (!alias)