Re: Freeze exception for sitesummary version 0.0.46 and/or 0.0.47
[Philipp Kern]
> Migrated now, soon coming to a mirror near you.
Great. I've uploaded version 0.0.47 to unstable now. This is the
relevant diff (trimmed, those interested in the Swedish translation
can check the package or #492067):
diff -Nru sitesummary-0.0.46/debian/changelog sitesummary-0.0.47/debian/changelog
--- sitesummary-0.0.46/debian/changelog 2008-07-27 13:05:37.000000000 +0200
+++ sitesummary-0.0.47/debian/changelog 2008-08-09 19:19:46.000000000 +0200
@@ -1,3 +1,15 @@
+sitesummary (0.0.47) unstable; urgency=low
+
+ * Fix bug in collector hook handling. Now it uses the correct
+ 'update' argument when calling hook scripts on updates.
+ * Make sure to export the get_primary_ip_address function in the
+ SiteSummary perl module.
+ * Add perl function get_macaddress() to return all ethernet
+ MAC addresses.
+ * Add Swedish translation from Martin Ãgren (Closes: #492067).
+
+ -- Petter Reinholdtsen <pere@debian.org> Sat, 9 Aug 2008 19:19:38 +0200
+
sitesummary (0.0.46) unstable; urgency=low
* Ignore bogus hardware version 'System Version' when reporting
diff -Nru sitesummary-0.0.46/debian/po/sv.po sitesummary-0.0.47/debian/po/sv.po
--- sitesummary-0.0.46/debian/po/sv.po 1970-01-01 01:00:00.000000000 +0100
+++ sitesummary-0.0.47/debian/po/sv.po 2008-07-28 19:00:19.000000000 +0200
@@ -0,0 +1,1 @@
+# translation of sitesummary_0.0.43_sv.po to Swedish
[...]
diff -Nru sitesummary-0.0.46/sitesummary-collector.cgi sitesummary-0.0.47/sitesummary-collector.cgi
--- sitesummary-0.0.46/sitesummary-collector.cgi 2008-07-04 09:33:40.000000000 +0200
+++ sitesummary-0.0.47/sitesummary-collector.cgi 2008-07-28 18:22:22.000000000 +0200
@@ -131,7 +131,7 @@
my $status = "new";
if ( -d $newdir ) {
`rm -r $newdir`;
- my $status = "update";
+ $status = "update";
}
rename $dirname, $newdir || die;
diff -Nru sitesummary-0.0.46/SiteSummary.pm sitesummary-0.0.47/SiteSummary.pm
--- sitesummary-0.0.46/SiteSummary.pm 2008-07-27 12:05:43.000000000 +0200
+++ sitesummary-0.0.47/SiteSummary.pm 2008-08-09 19:18:27.000000000 +0200
@@ -15,7 +15,9 @@
get_sitegroup
get_hostname
get_dns_address
+ get_macaddresses
get_primary_macaddress
+ get_primary_ip_address
get_linux_kernel_ver
get_debian_edu_profile
get_debian_edu_ver
@@ -101,6 +103,26 @@
}
#
+# Return all MAC addresses
+sub get_macaddresses {
+ my $hostid = shift;
+ my $path = get_filepath_current($hostid, "/system/ifconfig-a");
+ if (open (FILE, $path)) {
+ my @macs;
+ while(<FILE>) {
+ chomp;
+ if (m/Link encap:Ethernet\s+HWaddr (\S+)\s+/) {
+ push(@macs, $1);
+ }
+ }
+ close(FILE);
+ return @macs;
+ } else {
+ return undef;
+ }
+}
+
+#
# Return the IP address on the primary network interface
#
sub get_primary_macaddress {
Please allow it into Lenny too.
Happy hacking,
--
Petter Reinholdtsen
Reply to: