mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 21:38:06 +02:00
nmcli: allow adding 'generic' connections via nmcli connection add
'nmcli connection edit' already allows adding and editing generic connections (added by2a2af5825a). (cherry picked from commit0ff9b75387)
This commit is contained in:
parent
aac87ecfd7
commit
b46ed87919
1 changed files with 5 additions and 0 deletions
|
|
@ -4006,6 +4006,7 @@ complete_connection_by_type (NMConnection *connection,
|
|||
GError **error)
|
||||
{
|
||||
NMSettingConnection *s_con;
|
||||
NMSettingGeneric *s_generic;
|
||||
NMSettingWired *s_wired;
|
||||
NMSettingInfiniband *s_infiniband;
|
||||
NMSettingWireless *s_wifi;
|
||||
|
|
@ -5232,6 +5233,10 @@ cleanup_olpc:
|
|||
if (!success)
|
||||
return FALSE;
|
||||
|
||||
} else if (!strcmp (con_type, NM_SETTING_GENERIC_SETTING_NAME)) {
|
||||
/* Add 'generic' setting */
|
||||
s_generic = (NMSettingGeneric *) nm_setting_generic_new ();
|
||||
nm_connection_add_setting (connection, NM_SETTING (s_generic));
|
||||
} else {
|
||||
g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
|
||||
_("Error: '%s' is not a valid connection type."),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue