summaryrefslogtreecommitdiffstats
path: root/pyanaconda/network.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2012-02-02 16:02:06 +0100
committerRadek Vykydal <rvykydal@redhat.com>2012-02-02 16:02:06 +0100
commit114f3111d3a598d3b7861ca1ec92844359c6b89e (patch)
tree3ad9456703c56e71a5ca5d0bf329b55b4a376dba /pyanaconda/network.py
parentddbd16b76c246c33c8515b1a7781ea8cfbf94cfb (diff)
downloadanaconda-114f3111d3a598d3b7861ca1ec92844359c6b89e.tar.gz
anaconda-114f3111d3a598d3b7861ca1ec92844359c6b89e.tar.xz
anaconda-114f3111d3a598d3b7861ca1ec92844359c6b89e.zip
Select the same device for ksdevice=link in loader and stage2 (#760250)
In loader strverscmp(3) is used so the patch will cover vast majority of cases (although e.g. eth9 would precede eth10 in loader, whereas eth10 would precede eth9 in stage 2 if there were more than 10 devcies having link). Resolves: rhbz#760250
Diffstat (limited to 'pyanaconda/network.py')
-rw-r--r--pyanaconda/network.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index ae29b6015..f822355e8 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -440,7 +440,8 @@ class Network:
bootif_mac = None
if ksdevice == 'bootif' and "BOOTIF" in flags.cmdline:
bootif_mac = flags.cmdline["BOOTIF"][3:].replace("-", ":").upper()
- for dev in self.netdevices:
+ # sort for ksdevice=link (to select the same device as in loader))
+ for dev in sorted(self.netdevices):
mac = self.netdevices[dev].get('HWADDR').upper()
if ksdevice == 'link' and isys.getLinkStatus(dev):
self.ksdevice = dev