[open-ils-commits] r7967 - trunk/Open-ILS/src/support-scripts
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 1 20:07:27 EDT 2007
Author: dbs
Date: 2007-11-01 19:52:32 -0400 (Thu, 01 Nov 2007)
New Revision: 7967
Modified:
trunk/Open-ILS/src/support-scripts/settings-tester.pl
Log:
Add check for expected hostname in <hosts> section.
Modified: trunk/Open-ILS/src/support-scripts/settings-tester.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/settings-tester.pl 2007-11-01 23:27:56 UTC (rev 7966)
+++ trunk/Open-ILS/src/support-scripts/settings-tester.pl 2007-11-01 23:52:32 UTC (rev 7967)
@@ -88,6 +88,9 @@
my @databases = $osrfxml->findnodes('//database');
foreach my $database (@databases) {
my $db_name = $database->findvalue("./db");
+ if (!$db_name) {
+ $db_name = $database->findvalue("./name");
+ }
my $db_host = $database->findvalue("./host");
my $db_port = $database->findvalue("./port");
my $db_user = $database->findvalue("./user");
@@ -147,9 +150,29 @@
$output .= $result;
}
-
+print "\nChecking libdbi and libdbi-drivers\n";
$output .= check_libdbd();
+print "\nChecking hostname\n";
+my @hosts = $osrfxml->findnodes('/opensrf/hosts/*');
+foreach my $host (@hosts) {
+ next unless $host->nodeType == XML::LibXML::XML_ELEMENT_NODE;
+ my $osrfhost = $host->nodeName;
+ my $he;
+ if ($osrfhost ne $hostname && $osrfhost ne "localhost") {
+ $result = " * ERROR: expected hostname '$hostname', found '$osrfhost' in <hosts> section of opensrf.xml\n";
+ warn $result;
+ $he = 1;
+ } elsif ($osrfhost eq "localhost") {
+ $result = " * OK: found hostname 'localhost' in <hosts> section of opensrf.xml\n";
+ } else {
+ $result = " * OK: found hostname '$hostname' in <hosts> section of opensrf.xml\n";
+ }
+ print $result unless $he;
+ $output .= $result;
+}
+
+
if ($gather) {
get_debug_info( $tmpdir, $log_dir, $conf_dir, $perloutput, $output );
}
More information about the open-ils-commits
mailing list