/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-migrateHWaddr.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-migrateHWaddr.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Oct 11 23:17:01 2010 UTC (14 years ago) by slords
Branch: MAIN
CVS Tags: e-smith-base-5_2_0-67_el5_sme, e-smith-base-5_2_0-71_el5_sme, e-smith-base-5_2_0-52_el5_sme, e-smith-base-5_2_0-51_el5_sme, e-smith-base-5_2_0-53_el5_sme, e-smith-base-5_2_0-68_el5_sme, e-smith-base-5_2_0-77_el5_sme, e-smith-base-5_2_0-59_el5_sme, e-smith-base-5_2_0-36_el5_sme, e-smith-base-5_2_0-56_el5_sme, e-smith-base-5_2_0-55_el5_sme, e-smith-base-5_2_0-78_el5_sme, e-smith-base-5_2_0-86_el5_sme, e-smith-base-5_2_0-76_el5_sme, e-smith-base-5_2_0-84_el5_sme, e-smith-base-5_2_0-38_el5_sme, e-smith-base-5_2_0-65_el5_sme, e-smith-base-5_2_0-88_el5_sme, e-smith-base-5_2_0-64_el5_sme, e-smith-base-5_2_0-47_el5_sme, e-smith-base-5_2_0-81_el5_sme, e-smith-base-5_2_0-82_el5_sme, e-smith-base-5_2_0-50_el5_sme, e-smith-base-5_2_0-57_el5_sme, e-smith-base-5_2_0-89_el5_sme, e-smith-base-5_2_0-49_el5_sme, e-smith-base-5_2_0-90_el5_sme, e-smith-base-5_2_0-48_el5_sme, e-smith-base-5_2_0-87_el5_sme, e-smith-base-5_2_0-80_el5_sme, e-smith-base-5_2_0-70_el5_sme, e-smith-base-5_2_0-66_el5_sme, e-smith-base-5_2_0-63_el5_sme, e-smith-base-5_2_0-41_el5_sme, e-smith-base-5_2_0-42_el5_sme, e-smith-base-5_2_0-61_el5_sme, e-smith-base-5_2_0-60_el5_sme, e-smith-base-5_2_0-58_el5_sme, e-smith-base-5_2_0-45_el5_sme, e-smith-base-5_2_0-46_el5_sme, e-smith-base-5_2_0-85_el5_sme, e-smith-base-5_2_0-69_el5_sme, e-smith-base-5_2_0-79_el5_sme, e-smith-base-5_2_0-72_el5_sme, e-smith-base-5_2_0-75_el5_sme, e-smith-base-5_2_0-73_el5_sme, e-smith-base-5_2_0-54_el5_sme, e-smith-base-5_2_0-37_el5_sme, e-smith-base-5_2_0-43_el5_sme, e-smith-base-5_2_0-44_el5_sme, e-smith-base-5_2_0-62_el5_sme, e-smith-base-5_2_0-74_el5_sme, e-smith-base-5_2_0-83_el5_sme
* Mon Oct 11 2010 Shad L. Lords <slords@mail.com> 5.2.0-36.sme
- Add migrate script to add missing HWaddr to interface records [SME: 6267]

1 slords 1.1 diff -up e-smith-base-5.2.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac.migrateHWaddr e-smith-base-5.2.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac
2     --- e-smith-base-5.2.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac.migrateHWaddr 2010-10-11 16:54:44.000000000 -0600
3     +++ e-smith-base-5.2.0/root/etc/e-smith/db/configuration/migrate/20interfaceMac 2010-10-11 17:16:20.000000000 -0600
4     @@ -0,0 +1,18 @@
5     +{
6     + foreach my $iface ( qw(InternalInterface ExternalInterface) )
7     + {
8     + my $iface = $DB->get($iface) || next;
9     + next if $iface->prop('HWAddress');
10     +
11     + if ($iface->prop('Name') =~ m{^(eth[0-9])$})
12     + {
13     + if (open(MAC, "/sys/class/net/$1/address"))
14     + {
15     + $addr=<MAC>;
16     + close(MAC);
17     + chomp $addr;
18     + $iface->set_prop('HWAddress', $addr);
19     + }
20     + }
21     + }
22     +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed