diff -Nur e-smith-base-5.4.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac e-smith-base-5.4.0_bz7991/root/etc/e-smith/db/configuration/migrate/20interfaceMac --- e-smith-base-5.4.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac 2013-01-31 16:52:03.000000000 +0100 +++ e-smith-base-5.4.0_bz7991/root/etc/e-smith/db/configuration/migrate/20interfaceMac 2013-11-23 14:50:29.459839615 +0100 @@ -2,17 +2,7 @@ foreach my $iface ( qw(InternalInterface ExternalInterface) ) { my $iface = $DB->get($iface) || next; - next if $iface->prop('HWAddress'); - - if ($iface->prop('Name') =~ m{^(eth[0-9])$}) - { - if (open(MAC, "/sys/class/net/$1/address")) - { - $addr=; - close(MAC); - chomp $addr; - $iface->set_prop('HWAddress', $addr); - } - } + next unless $iface->prop('HWAddress'); + $iface->delete_prop('HWAddress'); } } diff -Nur e-smith-base-5.4.0/root/etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-ethX/10HWADDR e-smith-base-5.4.0_bz7991/root/etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-ethX/10HWADDR --- e-smith-base-5.4.0/root/etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-ethX/10HWADDR 2013-01-31 16:52:03.000000000 +0100 +++ e-smith-base-5.4.0_bz7991/root/etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-ethX/10HWADDR 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -{ - $OUT = ""; - return if ($InternalInterface{Name} eq "bond0"); - return unless $THIS_DEVICE =~ /^eth[01]$/; - my $hwaddr = $is_internal ? - $InternalInterface{HWAddress}: - $ExternalInterface{HWAddress}; - $OUT .= "HWADDR=$hwaddr" if $hwaddr; -} diff -Nur e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm e-smith-base-5.4.0_bz7991/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm --- e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2013-11-23 14:46:27.556543985 +0100 +++ e-smith-base-5.4.0_bz7991/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2013-11-10 23:25:28.743412895 +0100 @@ -51,39 +51,37 @@ { # We'll use a VLAN on eth0 for the "dedicated" WAN link $db->set_value("EthernetDriver2", "unknown"); - $db->set_prop("ExternalInterface", "HWAddress", ""); return 'CHANGE'; } # Internal, and there's only one my (undef, $driver, $hwaddr, undef) = split (/\s+/, $adapters[0], 4); $db->set_value("EthernetDriver1", $driver); - $db->set_prop("InternalInterface", "HWAddress", $hwaddr); return 'CHANGE'; } my %tag2driver; - my %tag2hwaddr; + my %tag2device; my @args; my $default; - my $existing_hwaddr; + my $existing_device; my $skip; if ($ifName eq "external") { - $skip = $db->get_prop("InternalInterface", "HWAddress"); - $existing_hwaddr = $db->get_prop("ExternalInterface", "HWAddress"); + $skip = $db->get_prop("InternalInterface", "Name"); + $existing_device = $db->get_prop("ExternalInterface", "Name"); } else { $skip = ""; - $existing_hwaddr = $db->get_prop("InternalInterface", "HWAddress"); + $existing_device = $db->get_prop("InternalInterface", "Name"); } - $existing_hwaddr ||= "unknown"; + $existing_device ||= "unknown"; foreach my $adapter ( @adapters ) { - my ($parameter, $driver, $hwaddr, $chipset) = split (/\t/, $adapter, 4); + my ($parameter, $driver, $hwaddr, $chipset, $device) = split (/\t/, $adapter, 5); chomp($chipset); #Ensure these are defined to at least "N/A" as no selection is shown if these are not defined. @@ -93,14 +91,14 @@ my $tag = ++$item . "."; $tag2driver{$tag} = $driver; - $tag2hwaddr{$tag} = $hwaddr; + $tag2device{$tag} = $device; my $display_name = gettext("Use") ." ". ${driver}. " " . $hwaddr ." ". ${chipset}; - if ($hwaddr ne $skip) + if ($device ne $skip) { push(@args, $tag, substr($display_name, 0, 65)); - $default = $tag if $hwaddr eq $existing_hwaddr; + $default = $tag if $device eq $existing_device; $default ||= $tag; } } @@ -128,12 +126,12 @@ return 'CANCEL' unless ($rc == 0); - return 'KEEP' if ($tag2hwaddr{$choice} eq $existing_hwaddr); + return 'KEEP' if ($tag2device{$choice} eq $existing_device); $db->set_value($confEntry, $tag2driver{$choice}); $db->set_prop( ($ifName eq "external") ? "ExternalInterface" : "InternalInterface", - "HWAddress", $tag2hwaddr{$choice} + "Name", $tag2device{$choice} ); return 'CHANGE';