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 > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 01:57 PM
Chris Lumens
 
Default Translate MAC addresses to devices in the second stage, too.

Related: rhbz#185522
---
kickstart.py | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index 503480e..2ef9738 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -565,9 +565,20 @@ class NetworkData(commands.network.F8_NetworkData):
else:
device = self.device

- try:
+ # If we were given a network device name, grab the device object.
+ # If we were given a MAC address, resolve that to a device name
+ # and then grab the device object. Otherwise, errors.
+ dev = None
+
+ if devices.has_key(device):
dev = devices[device]
- except KeyError:
+ else:
+ for d in devices:
+ if d.get("HWADDR") == device:
+ dev = d
+ break
+
+ if not dev:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="The provided network interface %s does not exist" % device)

dev.set (("bootproto", self.bootProto))
--
1.7.0.1

_______________________________________________
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 08:53 PM.

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