[PATCH rhel7-branch] network: GUI: reactivate connection automatically after configuration (#1033063)

Radek Vykydal rvykydal at redhat.com
Mon Sep 29 09:37:18 UTC 2014


Resolves: rhbz#1033063

We used to require turning the connection off and on for the configuration to
be actually applied which is what most of the users doesn't seem to expect.
---
 pyanaconda/ui/gui/spokes/network.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 355756f..6354041 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -541,6 +541,13 @@ class NetworkControlBox(GObject.GObject):
             log.debug("network: on_edit_connection: can't find connection for device %s", devname)
             return
 
+        if dev_cfg.device_type != NetworkManager.DeviceType.WIFI \
+           and dev_cfg.get_iface() in nm.nm_activated_devices():
+            # Reactivate the connection after configuring it (if it changed)
+            settings = nm.nm_get_settings(uuid, "connection", "uuid")
+            settings_changed = lambda: settings != nm.nm_get_settings(uuid, "connection", "uuid")
+            activate = (uuid, devname, settings_changed)
+
         log.info("network: configuring connection %s device %s ssid %s",
                  uuid, devname, self.selected_ssid)
         self.kill_nmce(msg="Configure button clicked")
-- 
1.9.3



More information about the anaconda-patches mailing list