Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r669 - branches/perfsonar-oppd-new-architect/lib/perfSONAR

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/SA2T3-OPPD] r669 - branches/perfsonar-oppd-new-architect/lib/perfSONAR


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r669 - branches/perfsonar-oppd-new-architect/lib/perfSONAR
  • Date: Mon, 15 Nov 2010 16:23:05 GMT

Author: dfn.calim
Date: 2010-11-15 16:23:05 +0000 (Mon, 15 Nov 2010)
New Revision: 669

Modified:
branches/perfsonar-oppd-new-architect/lib/perfSONAR/MP.pm
Log:
Add command check at start

Modified: branches/perfsonar-oppd-new-architect/lib/perfSONAR/MP.pm
===================================================================
--- branches/perfsonar-oppd-new-architect/lib/perfSONAR/MP.pm 2010-11-15
14:53:30 UTC (rev 668)
+++ branches/perfsonar-oppd-new-architect/lib/perfSONAR/MP.pm 2010-11-15
16:23:05 UTC (rev 669)
@@ -97,10 +97,21 @@
The constructor is called withoud a parameter.
=cut
sub new{
- my ($class) = @_;
+ my ($class,%module_param) = @_;
my $self = {};
$self->{LOGGER} = get_logger(__PACKAGE__);
+ $self->{COMMAND} = $module_param{command};
+ my $ret = `which $self->{COMMAND} 2>/dev/null`;
+ if ( length $ret <= 0 ){
+ my @errmsg;
+ push @errmsg, "ERROR:";
+ push @errmsg, "command:", $self->{COMMAND} ;
+ push @errmsg, "not found";
+ $self->{LOGGER}->error("@errmsg");
+ die "@errmsg";
+ }
bless $self, $class;
+ return $self;
}

=head2 runMeasurement({})



  • [pS-dev] [GEANT/SA2/SA2T3-OPPD] r669 - branches/perfsonar-oppd-new-architect/lib/perfSONAR, svn-noreply, 11/15/2010

Archive powered by MHonArc 2.6.16.

Top of Page