1 |
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 |
2 |
--- e-smith-base-5.4.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac 2013-01-31 16:52:03.000000000 +0100 |
3 |
+++ e-smith-base-5.4.0_bz7991/root/etc/e-smith/db/configuration/migrate/20interfaceMac 2013-11-23 14:50:29.459839615 +0100 |
4 |
@@ -2,17 +2,7 @@ |
5 |
foreach my $iface ( qw(InternalInterface ExternalInterface) ) |
6 |
{ |
7 |
my $iface = $DB->get($iface) || next; |
8 |
- next if $iface->prop('HWAddress'); |
9 |
- |
10 |
- if ($iface->prop('Name') =~ m{^(eth[0-9])$}) |
11 |
- { |
12 |
- if (open(MAC, "/sys/class/net/$1/address")) |
13 |
- { |
14 |
- $addr=<MAC>; |
15 |
- close(MAC); |
16 |
- chomp $addr; |
17 |
- $iface->set_prop('HWAddress', $addr); |
18 |
- } |
19 |
- } |
20 |
+ next unless $iface->prop('HWAddress'); |
21 |
+ $iface->delete_prop('HWAddress'); |
22 |
} |
23 |
} |
24 |
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 |
25 |
--- 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 |
26 |
+++ 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 |
27 |
@@ -1,9 +0,0 @@ |
28 |
-{ |
29 |
- $OUT = ""; |
30 |
- return if ($InternalInterface{Name} eq "bond0"); |
31 |
- return unless $THIS_DEVICE =~ /^eth[01]$/; |
32 |
- my $hwaddr = $is_internal ? |
33 |
- $InternalInterface{HWAddress}: |
34 |
- $ExternalInterface{HWAddress}; |
35 |
- $OUT .= "HWADDR=$hwaddr" if $hwaddr; |
36 |
-} |
37 |
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 |
38 |
--- e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2013-11-23 14:46:27.556543985 +0100 |
39 |
+++ 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 |
40 |
@@ -51,39 +51,37 @@ |
41 |
{ |
42 |
# We'll use a VLAN on eth0 for the "dedicated" WAN link |
43 |
$db->set_value("EthernetDriver2", "unknown"); |
44 |
- $db->set_prop("ExternalInterface", "HWAddress", ""); |
45 |
return 'CHANGE'; |
46 |
} |
47 |
# Internal, and there's only one |
48 |
my (undef, $driver, $hwaddr, undef) = split (/\s+/, $adapters[0], 4); |
49 |
$db->set_value("EthernetDriver1", $driver); |
50 |
- $db->set_prop("InternalInterface", "HWAddress", $hwaddr); |
51 |
return 'CHANGE'; |
52 |
} |
53 |
|
54 |
my %tag2driver; |
55 |
- my %tag2hwaddr; |
56 |
+ my %tag2device; |
57 |
my @args; |
58 |
my $default; |
59 |
- my $existing_hwaddr; |
60 |
+ my $existing_device; |
61 |
my $skip; |
62 |
|
63 |
if ($ifName eq "external") |
64 |
{ |
65 |
- $skip = $db->get_prop("InternalInterface", "HWAddress"); |
66 |
- $existing_hwaddr = $db->get_prop("ExternalInterface", "HWAddress"); |
67 |
+ $skip = $db->get_prop("InternalInterface", "Name"); |
68 |
+ $existing_device = $db->get_prop("ExternalInterface", "Name"); |
69 |
} |
70 |
else |
71 |
{ |
72 |
$skip = ""; |
73 |
- $existing_hwaddr = $db->get_prop("InternalInterface", "HWAddress"); |
74 |
+ $existing_device = $db->get_prop("InternalInterface", "Name"); |
75 |
} |
76 |
|
77 |
- $existing_hwaddr ||= "unknown"; |
78 |
+ $existing_device ||= "unknown"; |
79 |
|
80 |
foreach my $adapter ( @adapters ) |
81 |
{ |
82 |
- my ($parameter, $driver, $hwaddr, $chipset) = split (/\t/, $adapter, 4); |
83 |
+ my ($parameter, $driver, $hwaddr, $chipset, $device) = split (/\t/, $adapter, 5); |
84 |
chomp($chipset); |
85 |
|
86 |
#Ensure these are defined to at least "N/A" as no selection is shown if these are not defined. |
87 |
@@ -93,14 +91,14 @@ |
88 |
my $tag = ++$item . "."; |
89 |
|
90 |
$tag2driver{$tag} = $driver; |
91 |
- $tag2hwaddr{$tag} = $hwaddr; |
92 |
+ $tag2device{$tag} = $device; |
93 |
|
94 |
my $display_name = gettext("Use") ." ". ${driver}. " " . $hwaddr ." ". ${chipset}; |
95 |
|
96 |
- if ($hwaddr ne $skip) |
97 |
+ if ($device ne $skip) |
98 |
{ |
99 |
push(@args, $tag, substr($display_name, 0, 65)); |
100 |
- $default = $tag if $hwaddr eq $existing_hwaddr; |
101 |
+ $default = $tag if $device eq $existing_device; |
102 |
$default ||= $tag; |
103 |
} |
104 |
} |
105 |
@@ -128,12 +126,12 @@ |
106 |
|
107 |
return 'CANCEL' unless ($rc == 0); |
108 |
|
109 |
- return 'KEEP' if ($tag2hwaddr{$choice} eq $existing_hwaddr); |
110 |
+ return 'KEEP' if ($tag2device{$choice} eq $existing_device); |
111 |
|
112 |
$db->set_value($confEntry, $tag2driver{$choice}); |
113 |
$db->set_prop( |
114 |
($ifName eq "external") ? "ExternalInterface" : "InternalInterface", |
115 |
- "HWAddress", $tag2hwaddr{$choice} |
116 |
+ "Name", $tag2device{$choice} |
117 |
); |
118 |
|
119 |
return 'CHANGE'; |