cli: connection: check for deprecated features on "add"/"modify"

If the user happens to create a WiMax or Wi-Fi WEP connection they get a
warning.
This commit is contained in:
Lubomir Rintel 2022-03-08 12:04:27 +01:00
parent 061c342474
commit 5b4b00b8d2

View file

@ -5246,6 +5246,11 @@ connection_warnings(NmCli *nmc, NMConnection *connection)
const GPtrArray *connections;
guint i, found;
const char *id;
const char *deprecated;
deprecated = _connection_check_deprecated(NM_CONNECTION(connection));
if (deprecated)
g_printerr(_("Warning: %s.\n"), deprecated);
connections = nm_client_get_connections(nmc->client);
if (!connections)