summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-02-21 12:00:27 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-02-27 11:17:39 +0100
commit9d2dfd9d977b21683d93c0facf303f52cee4347a (patch)
tree6f8918d795d6a9d8de2b99d84b81c62c01d12e0b
parent9cc15d39eb5257f05d3e6633d46a5a428f417917 (diff)
downloadNetworkManager-lr/nmtui-slaves-after-master-rh1369008.tar.gz
ifcfg: avoid marking newly created connections as Unsavedlr/nmtui-slaves-after-master-rh1369008
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
index 3833f3574e..ba8ea323e3 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
@@ -455,6 +455,11 @@ nm_ifcfg_connection_new (NMConnection *source,
if (out_ignore_error)
*out_ignore_error = FALSE;
+ if (full_path) {
+ /* The connection already is on the disk */
+ update_unsaved = FALSE;
+ }
+
/* If we're given a connection already, prefer that instead of re-reading */
if (source)
tmp = g_object_ref (source);
@@ -465,9 +470,6 @@ nm_ifcfg_connection_new (NMConnection *source,
out_ignore_error);
if (!tmp)
return NULL;
-
- /* If we just read the connection from disk, it's clearly not Unsaved */
- update_unsaved = FALSE;
}
if (unhandled_spec && g_str_has_prefix (unhandled_spec, "unmanaged:"))