Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2643 - trunk/perfsonar-bundle

Subject: perfsonar development work

List archive

perfsonar: r2643 - trunk/perfsonar-bundle


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2643 - trunk/perfsonar-bundle
  • Date: Mon, 13 Aug 2007 12:41:46 -0400

Author: fernandes
Date: 2007-08-13 12:41:45 -0400 (Mon, 13 Aug 2007)
New Revision: 2643

Modified:
trunk/perfsonar-bundle/install.pl
Log:
Corrected dependency check position in the script.



Modified: trunk/perfsonar-bundle/install.pl
===================================================================
--- trunk/perfsonar-bundle/install.pl 2007-08-13 15:32:22 UTC (rev 2642)
+++ trunk/perfsonar-bundle/install.pl 2007-08-13 16:41:45 UTC (rev 2643)
@@ -8,20 +8,7 @@
use strict;

my $error;
-&checkDeps();

-if($error){
- print "Please fix the dependencies problems and then try again.\n";
- exit;
-}
-
-use LWP::UserAgent;
-my $ua = LWP::UserAgent->new;
-my $req =
- HTTP::Request->new(
- POST => 'http://mu.dante.org.uk:8092/Emailer/mailer.jsp' );
-$req->content_type('application/x-www-form-urlencoded');
-
use constant {
RRDMA => 1,
SQLMA => 2,
@@ -139,7 +126,16 @@
}

sub getFeedback() {
- my $menu;
+ &checkLwp();
+
+ use LWP::UserAgent;
+ my $ua = LWP::UserAgent->new;
+ my $req =
+ HTTP::Request->new(
+ POST => 'http://mu.dante.org.uk:8092/Emailer/mailer.jsp' );
+ $req->content_type('application/x-www-form-urlencoded');
+
+ my $menu;
my $stop = '';
my $message;
my $name;
@@ -341,7 +337,9 @@
if ($service) {
if ( $service >= PERL() ) {
$isPerl = 'true';
- }
+ }else{
+ &checkJava();
+ }
&installDir();
}
else {
@@ -661,6 +659,8 @@
}

sub download() {
+ &checkTools();
+
my $menu;
my $choice;
my $file = $serviceFilesTar{$service};
@@ -772,6 +772,7 @@
}
else {
$isPerl = '';
+ &checkJava();
}
}

@@ -1083,7 +1084,7 @@
}
}

-sub checkDeps {
+sub checkJava {
if(!(exists($ENV{'JAVA_HOME'}))){
&depError("Dependency failure: In order for the installer to work
correctly you need to set the JAVA_HOME enviroment variable.\n");
}else{
@@ -1106,11 +1107,33 @@
}
close(JAVA);
}
-
+
+ if($error){
+ print "Please fix the dependencies problems and then try again.\n";
+ exit;
+ }
+}
+
+sub checkTools {
if(system("wget -V > /dev/null") != 0){
- &depError("Dependency failure: wget must be in the user execution
path.\n");
+ &depError("Dependency failure: wget must be installed and in the
user execution path.\n");
}
+
+ if(system("tar --version > /dev/null") != 0){
+ &depError("Dependency failure: tar must be installed and in the user
execution path.\n");
+ }
+
+ if(system("gzip --version > /dev/null") != 0){
+ &depError("Dependency failure: gzip must be installed and in the
user execution path.\n");
+ }
+
+ if($error){
+ print "Please fix the dependencies problems and then try again.\n";
+ exit;
+ }
+}

+sub checkLwp {
eval {
require LWP;
};
@@ -1118,7 +1141,12 @@
&depError("Dependency failure: couldn't locate perl LWP module.\n");
}

+ if($error){
+ print "Please fix the dependencies problems and then try again.\n";
+ exit;
+ }
}
+
sub depError(){
print @_;
$error = 1;



  • perfsonar: r2643 - trunk/perfsonar-bundle, svnlog, 08/13/2007

Archive powered by MHonArc 2.6.16.

Top of Page