fence-agents: master - build: scan for fence agents only when required to do so

Fabio M. Di Nitto fabbione@fedoraproject.org
Wed Jan 21 12:51:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=2bbb0c85c947c47b878df2b7691bc8a9d1b2200b
Commit:        2bbb0c85c947c47b878df2b7691bc8a9d1b2200b
Parent:        42269f7d03dac4f9e09dc81dfa42d04249b7d58f
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Wed Jan 21 13:51:54 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Jan 21 13:51:54 2009 +0100

build: scan for fence agents only when required to do so

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 configure |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 3ba64f4..ad9437e 100755
--- a/configure
+++ b/configure
@@ -330,15 +330,17 @@ if (defined($release_version) && not length $release_version) {
   $release_version="";
 }
 
-@args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
-open (IFILE, "@args |");
-while (<IFILE>) {
-  chomp;
-  s|fence\/agents\/| |g;
-  s|lib ||g;
-  $all_fence = $_;
+if ((!$fence_agents) || ($fence_agents eq "all") || ($fence_agents eq "help")) {
+  @args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
+  open (IFILE, "@args |");
+  while (<IFILE>) {
+    chomp;
+    s|fence\/agents\/| |g;
+    s|lib ||g;
+    $all_fence = $_;
+  }
+  close IFILE;
 }
-close IFILE;
 
 if ($fence_agents eq "help") {
   print "Available fence agents:\n$all_fence\n";



More information about the Cluster-cvs mailing list