[interchange-cvs] interchange - jon modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Tue Jan 8 17:14:00 2002
User: jon
Date: 2002-01-08 22:13:36 GMT
Modified: dist/lib/UI/usertag version.tag
Modified: dist/lib/UI/pages/admin genconfig.html
Log:
Add server hostname to informational output, especially useful in multi-
server clusters where the IC daemon is on a different machine from the
web server and/or database server.
Sys::Hostname has been part of the Perl core modules since 5.005, and
seems to be the best way to do this, unlike `hostname` which may not
work with Cygwin or with weird $ENV{PATH}, or Net::Domain which blocks
on DNS lookups and mangles domain names guessing the hostname wrongly.
Revision Changes Path
2.4 +9 -0 interchange/dist/lib/UI/usertag/version.tag
rev 2.4, prev_rev 2.3
Index: version.tag
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/usertag/version.tag,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -u -r2.3 -r2.4
--- version.tag 2001/11/07 01:37:29 2.3
+++ version.tag 2002/01/08 22:13:36 2.4
@@ -86,6 +86,13 @@
$done_something = 1;
}
+ if($opt->{hostname}) {
+ require Sys::Hostname;
+ push @out, Sys::Hostname::hostname()
+ || errmsg("unable to determine hostname");
+ $done_something = 1;
+ }
+
if(not $opt->{db} || $opt->{modules} || $done_something) {
$opt->{db} = 1;
push @out, "Interchange Version $::VERSION";
@@ -114,6 +121,7 @@
push @out, "<BLOCKQUOTE>$avail</BLOCKQUOTE>";
}
}
+
if($opt->{modules}) {
my %wanted = ( qw/
Safe::Hole Safe::Hole
@@ -149,6 +157,7 @@
}
}
}
+
return join $joiner, @out;
}
EOR
2.3 +14 -7 interchange/dist/lib/UI/pages/admin/genconfig.html
rev 2.3, prev_rev 2.2
Index: genconfig.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/genconfig.html,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -u -r2.2 -r2.3
--- genconfig.html 2001/08/02 17:22:36 2.2
+++ genconfig.html 2002/01/08 22:13:36 2.3
@@ -40,7 +40,7 @@
<TD>
[L]Global[/L]: [version extended=1 global_error=1]<br>
[L]Local[/L]: [version extended=1 local_error=1]
- </TD>
+ </TD>
</TR>
@@ -81,7 +81,7 @@
</XMP>
</FONT>
[/if]
- </TD>
+ </TD>
</TR>
<TR>
@@ -114,11 +114,19 @@
[L]Interchange version[/L]
</TH>
<TD> </TD>
- <TD> [version]</A></TD>
+ <TD>[version]</TD>
</TR>
<TR>
<TH VALIGN=TOP ALIGN=RIGHT>
+ [L]Server hostname[/L]
+ </TH>
+ <TD> </TD>
+ <TD>[version extended=1 hostname=1]</TD>
+</TR>
+
+<TR>
+ <TH VALIGN=TOP ALIGN=RIGHT>
[L]Interchange PID[/L]
</TH>
<TD> </TD>
@@ -170,8 +178,7 @@
<A HREF="[area href="@@MV_PAGE@@" form="more_perl=1"]">[L]Perl Version[/L]</A>
</TH>
<TD> </TD>
- <TD>Perl [version extended=1 perl=1 perl_config="[cgi more_perl]"]
- </TD>
+ <TD>Perl [version extended=1 perl=1 perl_config="[cgi more_perl]"]</TD>
</TR>
<TR>
@@ -179,7 +186,7 @@
[L]Optional Module Information[/L]
</TH>
<TD> </TD>
- <TD> [version extended=1 modules=1]</A></TD>
+ <TD>[version extended=1 modules=1]</TD>
</TR>
<TR>
@@ -203,7 +210,7 @@
[L]Database Interfaces[/L]
</TH>
<TD> </TD>
- <TD VALIGN=top> [version extended=1 db=1]</TD>
+ <TD VALIGN=top>[version extended=1 db=1]</TD>
</TR>
<TR>