From 02e5a8d10a39f0f401b72f3a0a39619770fe51de Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 1 Aug 2019 07:50:53 +0200 Subject: [PATCH] cli: don't require "ifname" when adding connection $ nmcli connection add type ethernet con-name t autoconnect no Error: ifname argument is required. This reverts commit a91eafdf95bc ('cli: 'con add': make ifname mandatory (except bond,bridge,vlan) (bgo #698113)'). Apparently ifname argument was required to avoid confusion (unexpected behavior). But I don't agree that is an issue, it's just annoying. Often you really have just one ethernet or Wi-Fi device, so this does not seem helpful. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/222 --- clients/common/nm-meta-setting-desc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 9b13bd7540..d3f5efaffb 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -5015,7 +5015,6 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_INTERFACE_NAME, .is_cli_option = TRUE, .property_alias = "ifname", - .inf_flags = NM_META_PROPERTY_INF_FLAG_REQD, .prompt = NM_META_TEXT_PROMPT_IFNAME, .property_type = DEFINE_PROPERTY_TYPE ( .get_fcn = _get_fcn_gobject,