summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2005-02-08 14:37:30 +0000
committerPaul Nasrat <pnasrat@redhat.com>2005-02-08 14:37:30 +0000
commit82932ca1e79e26f3a3d5ca75ec0e4a3f035a3859 (patch)
tree39ba8352cc86bb0ceac39ced4442fe4d6c8ac96a /network.py
parent85c0b018dd9fb1c0780397fff333c6993e3f91ae (diff)
downloadanaconda-82932ca1e79e26f3a3d5ca75ec0e4a3f035a3859.tar.gz
anaconda-82932ca1e79e26f3a3d5ca75ec0e4a3f035a3859.tar.xz
anaconda-82932ca1e79e26f3a3d5ca75ec0e4a3f035a3859.zip
Put fixes for #138852 and #146915 on HEAD
Diffstat (limited to 'network.py')
-rw-r--r--network.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/network.py b/network.py
index 6d2363bf9..efcab6d7c 100644
--- a/network.py
+++ b/network.py
@@ -247,6 +247,13 @@ class Network:
return self.firstnetdevice
def available(self):
+ ksdevice = None
+ cmdline = open("/proc/cmdline").read()
+ if cmdline.find("ksdevice=") != -1:
+ ksdevice = \
+ cmdline[cmdline.index("ksdevice="):].split(" ")[0]
+ ksdevice = ksdevice.split("=")[1].strip()
+
f = open("/proc/net/dev")
lines = f.readlines()
f.close()
@@ -266,6 +273,9 @@ class Network:
except Exception, e:
log("exception getting mac addr: %s" %(e,))
+ if ksdevice and self.netdevices.has_key(ksdevice):
+ self.firstnetdevice = ksdevice
+
return self.netdevices
def setHostname(self, hn):