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 > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 04-27-2010, 08:49 AM
Radek Vykydal
 
Default Use proper attribute instead of NetworkDevice 'DESC' hack (#520146)

Note: other occurences of 'DESC' usage are replaced in following
patches.
---
iw/advanced_storage.py | 2 +-
network.py | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/iw/advanced_storage.py b/iw/advanced_storage.py
index 902d8ac..d3d4360 100644
--- a/iw/advanced_storage.py
+++ b/iw/advanced_storage.py
@@ -53,7 +53,7 @@ def addFcoeDrive(anaconda):
continue

i = store.append(None)
- desc = netdevs[dev].get("DESC")
+ desc = netdevs[dev].description
if desc:
desc = "%s - %s" %(dev, desc)
else:
diff --git a/network.py b/network.py
index 974784f..20a21b2 100644
--- a/network.py
+++ b/network.py
@@ -245,6 +245,7 @@ class NetworkDevice(IfcfgFile):
self.logfile = logfile
if iface.startswith('ctc'):
self.info["TYPE"] = "CTC"
+ self.description = ""

def clear(self):
IfcfgFile.clear(self)
@@ -256,8 +257,6 @@ class NetworkDevice(IfcfgFile):
keys = self.info.keys()
keys.sort()
keys.remove("DEVICE")
- if "DESC" in keys:
- keys.remove("DESC")
keys.insert(0, "DEVICE")
if "KEY" in keys:
keys.remove("KEY")
@@ -784,8 +783,8 @@ class Network:
addr = addr.lower()

s = ""
- if len(dev.get("DESC")) > 0:
- s = "# %s (rule written by anaconda)
" % (dev.get("DESC"),)
+ if len(dev.description) > 0:
+ s = "# %s (rule written by anaconda)
" % (dev.description,)
else:
s = "# %s (rule written by anaconda)
" % (devname,)
s = s + 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1", KERNEL=="%s*", NAME="%s"
' % (addr, basename, devname,)
--
1.6.0.6

_______________________________________________
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 09:31 AM.

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