nmcli: allow adding 'generic' connections via nmcli connection add

'nmcli connection edit' already allows adding and editing generic connections
(added by 2a2af5825a).

(cherry picked from commit 0ff9b75387)
This commit is contained in:
Jiří Klimeš 2015-02-10 15:33:35 +01:00
parent aac87ecfd7
commit b46ed87919

View file

@ -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."),