FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Marketing

 
 
LinkBack Thread Tools
 
Old 11-02-2010, 02:44 PM
Radek Vykydal
 
Default Do not rely on presence of DEVICE setting in ifcfg files.

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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org