Commit 02e5a8d1 authored by Thomas Haller's avatar Thomas Haller

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 a91eafdf ('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.

NetworkManager/NetworkManager!222
parent 2c517691
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment