perfsonar-dev - perfsonar: r2631 - trunk/perfsonar-bundle
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: perfsonar: r2631 - trunk/perfsonar-bundle
- Date: Fri, 10 Aug 2007 13:20:45 -0400
Author: fernandes
Date: 2007-08-10 13:20:44 -0400 (Fri, 10 Aug 2007)
New Revision: 2631
Modified:
trunk/perfsonar-bundle/install.pl
Log:
Beta version with support of E2Emon MP
Modified: trunk/perfsonar-bundle/install.pl
===================================================================
--- trunk/perfsonar-bundle/install.pl 2007-08-10 14:41:19 UTC (rev 2630)
+++ trunk/perfsonar-bundle/install.pl 2007-08-10 17:20:44 UTC (rev 2631)
@@ -29,6 +29,7 @@
CLMP => 4,
LS => 5,
BWCTL => 6,
+ E2EMON => 7,
PERL => 6 #The number where perl services start
};
@@ -50,6 +51,7 @@
CLMP() => "Command Line MP",
LS() => "Lookup Service",
BWCTL() => "BWCTL MP",
+ E2EMON() => "E2Emon MP",
);
my %serviceMap = (
@@ -59,6 +61,7 @@
CLMP() => "CLMP",
LS() => "LS",
BWCTL() => "BWCTL",
+ E2EMON() => "E2E",
);
my %servicesTar = (
@@ -74,6 +77,7 @@
"http://www.perfsonar.net/download/services/services_download.php?product=XML-LS&version=1.1.1",
BWCTL() =>
"http://www.perfsonar.net/download/services/services_download.php?product=DFN_Perl-Base_BWCTL-MP&version=0.2",
+ E2EMON() =>
"http://wiki.perfsonar.net/jra1-wiki/images/8/8d/G2_E2Emon_MP_1-1RC4.tar.gz",
);
my %serviceFilesTar = (
@@ -83,6 +87,7 @@
SQLMA() => "perfSONAR-SQL-MA-1.3.tar.gz",
LS() => "XML-LS-1.1.1.tar.gz",
BWCTL() => "DFN_Perl-Base_BWCTL-MP-0.2.tar.gz",
+ E2EMON() => "G2_E2Emon_MP_1-1RC4.tar.gz",
);
my $currentDir = `pwd`;
@@ -286,10 +291,17 @@
my $ok = '';
if ( system( "test -d " . $serviceDir . ".install" ) == 0 ) {
chdir( $serviceDir . ".install" );
- if ( system("cp configure deploy undeploy test
$installDir") == 0 )
- {
- $ok = 'true';
- }
+ if(system("test -f configure") == 0){
+ if ( system("cp configure deploy undeploy test
$installDir") == 0 )
+ {
+ $ok = 'true';
+ }
+ }elsif(system("test -f configure.pl") == 0){
+ if ( system("cp configure.pl deploy.pl undeploy.pl
$installDir") == 0 )
+ {
+ $ok = 'true';
+ }
+ }
chdir($currentDir);
}
if ( !$ok ) {
@@ -385,7 +397,7 @@
system( "test -d " . $serviceDir ) != 0
|| ( system( "test -d " . $serviceDir
. "WEB-INF" ) != 0
&& system(
- "test -f " .
$serviceDir . "bin/perfsonar.pl" ) !=
+ "test -d " .
$serviceDir . "bin" ) !=
0 )
)
{
@@ -416,7 +428,7 @@
if (
system( "test -d " . $serviceDir ) != 0
|| ( system( "test -d " . $serviceDir . "WEB-INF" )
!= 0
- && system( "test -f " . $serviceDir .
"bin/perfsonar.pl" ) !=
+ && system( "test -d " . $serviceDir . "bin" )
!=
0 )
)
{
@@ -525,9 +537,9 @@
for ( $i = 0 ; $i < scalar(@dirs) ; $i++ ) {
$dirs[$i] =~ s/\/WEB-INF//;
}
- @perl = `find $webappsDir -regex ".*bin/perfsonar\.pl\$"`;
+ @perl = `find $webappsDir -type d -regex ".*bin\$"`;
for ( $i = 0 ; $i < scalar(@perl) ; $i++ ) {
- $perl[$i] =~ s/\/bin\/perfsonar\.pl//;
+ $perl[$i] =~ s/\/bin//;
}
push( @dirs, @perl );
chomp(@dirs);
@@ -581,7 +593,7 @@
for ( $i = 0 ; $i < scalar(@dirs) ; $i++ ) {
if ($isPerl) {
- $dirs[$i] =~ s/\/pre-install$/\//;
+ $dirs[$i] =~ s/\/pre-install.*$/\//;
}
else {
$dirs[$i] =~ s/\/ant$/\//;
@@ -768,7 +780,10 @@
my @confSD;
@dirs =
`find $currentDir -type d -regex
".*$serviceMap{$service}.*/perfsonar/ant\$"`;
- @perl = `find $currentDir -regex
".*$serviceMap{$service}.*/pre-install\$"`;
+ @perl = `find $currentDir -regex
".*$serviceMap{$service}.*/pre-install\\(.pl\\)?\$"`;
+ if(system("test -f .install.conf") != 0){
+ system("touch .install.conf 2>&1 >> /dev/null");
+ }
@confSD =
`cat .install.conf | grep $serviceMap{$service} | cut -d "=" -f 2`;
chomp(@perl);
@@ -937,7 +952,15 @@
}
else {
chdir($installDir);
- $returnCode = system "perl " . $target;
+ if(system("test -f $target") eq 0){
+ $returnCode = system "perl " . $target;
+ }elsif(system("test -f $target.pl") eq 0){
+ $returnCode = system "perl " . $target . ".pl";
+ }else{
+ print "\nThere was a problem finding the file needed to do this
step.";
+ print "\nPlease check if the installation wasn't corrupted, or
get in ";
+ print "\ntouch with perfSONAR support at
perfsonar-user\@perfsonar.net.";
+ }
}
chdir($currentDir);
}
@@ -989,11 +1012,19 @@
}
else {
my $ok = 'true';
+ my $path;
+ my $filespl = '';
chdir($installDir);
- my $path =
- `cat configure | grep "my \\\$installpath" | cut -d '"' -f
2`;
- chomp($path);
-
+ if(system("test -f configure") == 0){
+ $path =
+ `cat configure | grep "my \\\$installpath" | cut -d
'"' -f 2`;
+ chomp($path);
+ }elsif(system("test -f configure.pl") == 0){
+ $path =
+ `cat configure.pl | grep "my \\\$installpath" | cut -d "'"
-f 2`;
+ chomp($path);
+ $filespl = 'true';
+ }
if ( !( $path =~ /\/$/ ) ) {
$path .= "/";
}
@@ -1006,20 +1037,27 @@
print "or tests for the installed service.\n";
print "Press any key when you're done...\n";
<STDIN>;
- if ( system( "test -d " . $path . ".install"
) == 0 ) {
+ if ( system( "test -d " . $path . ".install"
) != 0 ) {
$ok = '';
}
}
}
if ($ok) {
- if (
- system(
- "cp configure deploy undeploy test "
. $path . ".install"
- ) != 0
- )
- {
- $ok = '';
- }
+ if($filespl){
+ if (system("cp configure.pl deploy.pl undeploy.pl "
+ . $path . ".install") != 0){
+ $ok = '';
+ }
+ }
+ else{
+ if (
+ system(
+ "cp configure deploy undeploy test "
. $path . ".install"
+ ) != 0 ) {
+
+ $ok = '';
+ }
+ }
}
if ( !$ok ) {
$menu =
- perfsonar: r2631 - trunk/perfsonar-bundle, svnlog, 08/10/2007
Archive powered by MHonArc 2.6.16.