summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-07-14 12:23:37 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-07-20 14:01:04 +0200
commitcee4eef6a4ab0503d8dd3c650d7a2b819432d781 (patch)
treeabfc59664368980f4481012c4ac074ce1b85a584 /iw
parent6dc159708058136522c9ec2f62287a1d0c22f0a4 (diff)
downloadanaconda-cee4eef6a4ab0503d8dd3c650d7a2b819432d781.tar.gz
anaconda-cee4eef6a4ab0503d8dd3c650d7a2b819432d781.tar.xz
anaconda-cee4eef6a4ab0503d8dd3c650d7a2b819432d781.zip
Fix selection of alternative iface in UI after fail (#507084).
Make ifcfg configuration files getting parsed properly after update. The used inotify configuration update mechanism (ifcfg-rh NM plugin) requires 1) writing of new files out of /etc/sysconfig/network-scripts dir so that it doesn't trigger parsing of the file too early (before all is written), and more importantly, 2) removing of the old files before moving the new ones in so that the new file gets parsed and the respective connection gets re-read and eventually activated. Also make sure that only device selected in UI has ONBOOT set to yes in case of selection of another device after fail.
Diffstat (limited to 'iw')
-rw-r--r--iw/netconfig_dialog.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py
index 29afc0ea4..ea59613de 100644
--- a/iw/netconfig_dialog.py
+++ b/iw/netconfig_dialog.py
@@ -226,8 +226,12 @@ class NetworkConfigurator:
combo = self.xml.get_widget("interfaceCombo")
active = combo.get_active_iter()
val = combo.get_model().get_value(active, 1)
- netdev = self.network.available()[val]
- netdev.set(('ONBOOT', 'yes'))
+ for v, dev in self.network.available().items():
+ if v == val:
+ dev.set(('ONBOOT', 'yes'))
+ netdev = dev
+ else:
+ dev.set(('ONBOOT', 'no'))
# FIXME: need to do input validation
if self.xml.get_widget("dhcpCheckbutton").get_active():