r2368 - in
packages/libsys-hostname-long-perl/branches/upstream/current:
. lib/Sys/Hostname t
Krzysztof Krzyzaniak
eloy at costa.debian.org
Wed Mar 15 17:37:11 UTC 2006
Author: eloy
Date: 2006-03-15 17:37:10 +0000 (Wed, 15 Mar 2006)
New Revision: 2368
Added:
packages/libsys-hostname-long-perl/branches/upstream/current/META.yml
Modified:
packages/libsys-hostname-long-perl/branches/upstream/current/Changes
packages/libsys-hostname-long-perl/branches/upstream/current/MANIFEST
packages/libsys-hostname-long-perl/branches/upstream/current/lib/Sys/Hostname/Long.pm
packages/libsys-hostname-long-perl/branches/upstream/current/t/local.t
packages/libsys-hostname-long-perl/branches/upstream/current/testall.pl
Log:
Load /tmp/tmp.NW19kX/libsys-hostname-long-perl-1.4 into
packages/libsys-hostname-long-perl/branches/upstream/current.
Modified: packages/libsys-hostname-long-perl/branches/upstream/current/Changes
===================================================================
--- packages/libsys-hostname-long-perl/branches/upstream/current/Changes 2006-03-15 17:35:36 UTC (rev 2367)
+++ packages/libsys-hostname-long-perl/branches/upstream/current/Changes 2006-03-15 17:37:10 UTC (rev 2368)
@@ -2,3 +2,10 @@
0.01 Sun Aug 26 18:07:52 2001
+1.3 Sun Jun 26 08:14:13 2005
+ New version to fix major Solaris problem
+ Thanks to patch from Piotr Klaban
+ and many others for reporting the problem.
+
+1.4 Sun Jun 26 08:14:13 2005
+ Damn... forgot something...
Modified: packages/libsys-hostname-long-perl/branches/upstream/current/MANIFEST
===================================================================
--- packages/libsys-hostname-long-perl/branches/upstream/current/MANIFEST 2006-03-15 17:35:36 UTC (rev 2367)
+++ packages/libsys-hostname-long-perl/branches/upstream/current/MANIFEST 2006-03-15 17:37:10 UTC (rev 2368)
@@ -5,3 +5,4 @@
t/local.t
testall.pl
lib/Sys/Hostname/Long.pm
+META.yml Module meta-data (added by MakeMaker)
Added: packages/libsys-hostname-long-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libsys-hostname-long-perl/branches/upstream/current/META.yml 2006-03-15 17:35:36 UTC (rev 2367)
+++ packages/libsys-hostname-long-perl/branches/upstream/current/META.yml 2006-03-15 17:37:10 UTC (rev 2368)
@@ -0,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: Sys-Hostname-Long
+version: 1.4
+version_from: lib/Sys/Hostname/Long.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17
Modified: packages/libsys-hostname-long-perl/branches/upstream/current/lib/Sys/Hostname/Long.pm
===================================================================
--- packages/libsys-hostname-long-perl/branches/upstream/current/lib/Sys/Hostname/Long.pm 2006-03-15 17:35:36 UTC (rev 2367)
+++ packages/libsys-hostname-long-perl/branches/upstream/current/lib/Sys/Hostname/Long.pm 2006-03-15 17:37:10 UTC (rev 2368)
@@ -11,7 +11,7 @@
# Use perl < 5.6 compatible methods for now, change to 'our' soon.
use vars qw(@EXPORT $VERSION $hostlong %dispatch $lastdispatch);
@EXPORT = qw/ hostname_long /;
-$VERSION = '1.2';
+$VERSION = '1.4';
%dispatch = (
@@ -72,12 +72,29 @@
'title' => 'Execute "hostname --fqdn"',
'description' => '',
'exec' => sub {
- my $tmp = `hostname --fqdn`;
+ # Skip for Solaris, and only run as non-root
+ my $tmp;
+ if ($< == 0) {
+ $tmp = `su nobody -c "hostname --fqdn"`;
+ } else {
+ $tmp = `hostname --fqdn`;
+ }
$tmp =~ tr/\0\r\n//d;
return $tmp;
},
},
+ 'exec_hostname_domainname' => {
+ 'title' => 'Execute "hostname" and "domainname"',
+ 'description' => '',
+ 'exec' => sub {
+ my $tmp = `hostname` . '.' . `domainname`;
+ $tmp =~ tr/\0\r\n//d;
+ return $tmp;
+ },
+ },
+
+
'network' => {
'title' => 'Network Socket hostname (not DNS)',
'description' => '',
@@ -166,6 +183,9 @@
# (covered above) } elsif ($^O eq "darwin") {
# $hostlong = dispatcher('uname');
+ } elsif ($^O eq 'solaris') {
+ $hostlong = dispatcher('exec_hostname_domainname');
+
} else {
$hostlong = dispatcher('exec_hostname_fqdn');
}
@@ -233,7 +253,7 @@
Linux Linux UNIX OS OK
Sparc OK
HPUX H.P. Unix 10? Not Tested
- Solaris SUN Solaris 7? OK
+ Solaris SUN Solaris 7? OK (now)
Irix SGI Irix 5? Not Tested
FreeBSD FreeBSD OK
@@ -473,6 +493,7 @@
David Dick
Graeme Hart
+ Piotr Klaban
* Extra code from G
* Dispatch table
@@ -492,7 +513,7 @@
=head1 COPYRIGHT
-Copyright (c) 2001,2004 Scott Penrose. All rights reserved.
+Copyright (c) 2001,2004,2005 Scott Penrose. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Property changes on: packages/libsys-hostname-long-perl/branches/upstream/current/t/local.t
___________________________________________________________________
Name: svn:executable
-
+ *
Property changes on: packages/libsys-hostname-long-perl/branches/upstream/current/testall.pl
___________________________________________________________________
Name: svn:executable
-
+ *
More information about the Pkg-perl-cvs-commits
mailing list