[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 3/3 master] Do not rely on presence of DEVICE setting in ifcfg files.
- From: Radek Vykydal <rvykydal redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH 3/3 master] Do not rely on presence of DEVICE setting in ifcfg files.
- Date: Tue, 2 Nov 2010 16:44:31 +0100
nm-c-e is not writing it out, and we can stumble over it
in Live CD environment, see bz #648635 for example.
---
pyanaconda/iw/network_gui.py | 2 +-
pyanaconda/network.py | 4 ++--
pyanaconda/textw/netconfig_text.py | 4 ++--
pyanaconda/vnc.py | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/iw/network_gui.py b/pyanaconda/iw/network_gui.py
index dead8ca..9f7c40d 100644
--- a/pyanaconda/iw/network_gui.py
+++ b/pyanaconda/iw/network_gui.py
@@ -150,7 +150,7 @@ def selectInstallNetDeviceDialog(network, devices = None):
ksdevice = network.getKSDevice()
if ksdevice:
- ksdevice = ksdevice.get('DEVICE')
+ ksdevice = ksdevice.iface
preselected = None
for dev in devices:
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 2c83ffe..8b567d5 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -549,7 +549,7 @@ class Network:
# ipv4 and ipv6
if dev.get("ONBOOT"):
line += " --onboot %s" % dev.get("ONBOOT")
- line += " --device %s" % dev.get("DEVICE")
+ line += " --device %s" % dev.iface
if dev.get('MTU') and dev.get('MTU') != "0":
line += " --mtu=%s" % dev.get('MTU')
@@ -742,7 +742,7 @@ class Network:
addr = dev.get("HWADDR")
if not addr:
continue
- devname = dev.get("DEVICE")
+ devname = dev.iface
basename = devname
while basename != "" and basename[-1] in string.digits:
basename = basename[:-1]
diff --git a/pyanaconda/textw/netconfig_text.py b/pyanaconda/textw/netconfig_text.py
index c05c96c..7a44516 100644
--- a/pyanaconda/textw/netconfig_text.py
+++ b/pyanaconda/textw/netconfig_text.py
@@ -74,7 +74,7 @@ class NetworkConfiguratorText:
# Preselect device set in kickstart
ksdevice = self.anaconda.network.getKSDevice()
if ksdevice:
- ksdevice = ksdevice.get("DEVICE")
+ ksdevice = ksdevice.iface
for devname in devnames:
hwaddr = self.netdevs[devname].get("HWADDR")
@@ -402,7 +402,7 @@ class NetworkConfiguratorText:
if not result:
self.anaconda.intf.messageWindow(_("Network Error"),
_("There was an error configuring "
- "network device %s") % dev.get('DEVICE'))
+ "network device %s") % dev.iface)
dev.set(("ONBOOT", "no"))
return False
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 0e22417..2760dbd 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -108,7 +108,7 @@ class VncServer:
dev = devices[active_devs[0]]
try:
- devname = dev.get("DEVICE")
+ devname = dev.iface
ips = (isys.getIPAddresses(devname, version=4) +
isys.getIPAddresses(devname, version=6))
self.ip = ips[0]
--
1.7.2
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]