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 Kernel

 
 
LinkBack Thread Tools
 
Old 03-29-2011, 11:51 AM
Radek Vykydal
 
Default Don't write HWADDR into ifcfg files (#690589)

Not needed anymore (udev and biosdevname take care of the naming).
---
iw/advanced_storage.py | 3 ++-
iw/network_gui.py | 2 +-
kickstart.py | 4 ++--
loader/net.c | 4 ----
network.py | 6 ++----
textw/add_drive_text.py | 2 +-
textw/netconfig_text.py | 2 +-
7 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/iw/advanced_storage.py b/iw/advanced_storage.py
index 391a6f0..799f612 100644
--- a/iw/advanced_storage.py
+++ b/iw/advanced_storage.py
@@ -31,6 +31,7 @@ import partIntfHelpers as pih
import storage.fcoe
import storage.iscsi
import urlgrabber.grabber
+import isys

import logging
log = logging.getLogger("anaconda")
@@ -338,7 +339,7 @@ def addFcoeDrive(anaconda):
else:
desc = "%s" %(dev,)

- mac = netdevs[dev].get("HWADDR")
+ mac = isys.getMacAddress(dev)
if mac:
desc = "%s - %s" %(desc, mac)

diff --git a/iw/network_gui.py b/iw/network_gui.py
index 702d227..1cbfbc6 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -167,7 +167,7 @@ def selectInstallNetDeviceDialog(network, devices = None):
else:
desc = "%s" %(dev,)

- hwaddr = network.netdevices[dev].get("HWADDR")
+ hwaddr = isys.getMacAddress(dev)

if hwaddr:
desc = "%s - %s" %(desc, hwaddr,)
diff --git a/kickstart.py b/kickstart.py
index b7ed5c4..c604ff0 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -584,8 +584,8 @@ class NetworkData(commands.network.RHEL6_NetworkData):
if devices.has_key(device):
dev = devices[device]
else:
- for (key, val) in devices.iteritems():
- if val.get("HWADDR").lower() == device.lower():
+ for devname in devices:
+ if isys.getMacAddress(devname).lower() == device.lower():
dev = val
break

diff --git a/loader/net.c b/loader/net.c
index 725c160..993f7c5 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1219,7 +1219,6 @@ int writeDisabledIfcfgFile(char *device) {
}

fprintf(fp, "DEVICE=%s
", device);
- fprintf(fp, "HWADDR=%s
", iface_mac2str(device));
fprintf(fp, "ONBOOT=no
");
fprintf(fp, "NM_CONTROLLED=no
");

@@ -1317,9 +1316,6 @@ int writeEnabledNetInfo(iface_t *iface) {
}

fprintf(fp, "DEVICE=%s
", iface->device);
-#if !defined(__s390__) && !defined(__s390x__)
- fprintf(fp, "HWADDR=%s
", iface_mac2str(iface->device));
-#endif
fprintf(fp, "ONBOOT=yes
");
char *str_type = netArpTypeStr(iface);
if (str_type) fprintf(fp, "TYPE=%s
", str_type);
diff --git a/network.py b/network.py
index eaf2f7b..a0be4c5 100644
--- a/network.py
+++ b/network.py
@@ -219,8 +219,6 @@ class NetworkDevice(IfcfgFile):
keys.insert(0, "DEVICE")
if "KEY" in keys:
keys.remove("KEY")
- if iutil.isS390() and ("HWADDR" in keys):
- keys.remove("HWADDR")
# make sure we include autoneg in the ethtool line
if 'ETHTOOL_OPTS' in keys:
eopts = self.get('ETHTOOL_OPTS')
@@ -353,7 +351,7 @@ class Network:
if ksdevice == 'bootif' and flags.cmdline.get("BOOTIF"):
bootif_mac = flags.cmdline.get("BOOTIF")[3:].replace("-", ":").upper()
for dev in self.netdevices:
- mac = self.netdevices[dev].get('HWADDR').upper()
+ mac = isys.getMacAddress(dev)
if ksdevice == 'link' and isys.getLinkStatus(dev):
self.ksdevice = dev
break
@@ -788,7 +786,7 @@ class Network:
netargs += "ip=%s::%s:%s:%s:%s:none" % (dev.get('ipaddr'),
gateway, netmask, hostname, nic)

- hwaddr = dev.get("HWADDR")
+ hwaddr = isys.getMacAddress(dev)
if hwaddr:
if netargs != "":
netargs += " "
diff --git a/textw/add_drive_text.py b/textw/add_drive_text.py
index 546e68d..dfc9291 100644
--- a/textw/add_drive_text.py
+++ b/textw/add_drive_text.py
@@ -370,7 +370,7 @@ class addDriveDialog(object):

interfaceList = Listbox(height=len(devs), scroll=1)
for dev in devs:
- hwaddr = netdevs[dev].get("HWADDR")
+ hwaddr = isys.getMacAddress(dev)
if hwaddr:
desc = "%s - %.50s" % (dev, hwaddr)
else:
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 4f72a36..220f682 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -77,7 +77,7 @@ class NetworkConfiguratorText:
ksdevice = ksdevice.get("DEVICE")

for devname in devnames:
- hwaddr = self.netdevs[devname].get("HWADDR")
+ hwaddr = isys.getMacAddress(dev)

if hwaddr:
desc = "%s - %.50s" % (devname, hwaddr)
--
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-29-2011, 12:18 PM
Ales Kozumplik
 
Default Don't write HWADDR into ifcfg files (#690589)

On 03/29/2011 01:51 PM, Radek Vykydal wrote:

Not needed anymore (udev and biosdevname take care of the naming).
---
iw/advanced_storage.py | 3 ++-
iw/network_gui.py | 2 +-
kickstart.py | 4 ++--
loader/net.c | 4 ----
network.py | 6 ++----
textw/add_drive_text.py | 2 +-
textw/netconfig_text.py | 2 +-
7 files changed, 9 insertions(+), 14 deletions(-)


Ack.

Al_

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-29-2011, 02:57 PM
Chris Lumens
 
Default Don't write HWADDR into ifcfg files (#690589)

> Not needed anymore (udev and biosdevname take care of the naming).

Is this appropriate for master and f15-branch as well?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-29-2011, 03:13 PM
Radek Vykydal
 
Default Don't write HWADDR into ifcfg files (#690589)

On 03/29/2011 04:57 PM, Chris Lumens wrote:

Not needed anymore (udev and biosdevname take care of the naming).

Is this appropriate for master and f15-branch as well?



I want to apply it to master too. For f15-branch
I am not sure - I am not aware of any problems
caused by anaconda writing out HWADDR and
I don't think removing it would cause any either.

Radek

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-30-2011, 03:01 PM
Bill Nottingham
 
Default Don't write HWADDR into ifcfg files (#690589)

Radek Vykydal (rvykydal@redhat.com) said:
> On 03/29/2011 04:57 PM, Chris Lumens wrote:
> >>Not needed anymore (udev and biosdevname take care of the naming).
> >Is this appropriate for master and f15-branch as well?
> >
>
> I want to apply it to master too. For f15-branch
> I am not sure - I am not aware of any problems
> caused by anaconda writing out HWADDR and
> I don't think removing it would cause any either.

Given that the impetus of this patch (bug #690589) is biosdevname,
and biosdevname is enabled by default in F-15, I'd think we should
have this in F-15.

Bill

_______________________________________________
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 12:14 AM.

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