[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-106-g4342c4e



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=4342c4ed4c1ea1ac52a679ce4a0138fbef416862

The branch, master has been updated
       via  4342c4ed4c1ea1ac52a679ce4a0138fbef416862 (commit)
      from  9aa8f60e85331a41af9b54615696fff75a77f643 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4342c4ed4c1ea1ac52a679ce4a0138fbef416862
Author: Fabio M. Di Nitto <fabbione fabbione net>
Date:   Sat Mar 29 06:47:15 2008 +0100

    [FENCE] Enable fence_apc_snmp
    
    Separate fence_apc_snmp from apc in its own directory.
    
    Update the build system to understand --mibdir and propagate it
    down to fence_apc_snmp and the install targets.
    
    Signed-off-by: Fabio M. Di Nitto <fabbione fabbione net>

-----------------------------------------------------------------------

Summary of changes:
 configure                                        |    7 +++++++
 fence/agents/{apc => apc_snmp}/Makefile          |    3 ++-
 fence/agents/{apc => apc_snmp}/fence_apc_snmp.py |    6 +++---
 fence/agents/{apc => apc_snmp}/powernet369.mib   |    0 
 make/defines.mk.input                            |    1 +
 make/fencepy.mk                                  |    4 ++++
 make/install.mk                                  |    4 ++++
 make/uninstall.mk                                |    3 +++
 8 files changed, 24 insertions(+), 4 deletions(-)
 copy fence/agents/{apc => apc_snmp}/Makefile (93%)
 rename fence/agents/{apc => apc_snmp}/fence_apc_snmp.py (99%)
 rename fence/agents/{apc => apc_snmp}/powernet369.mib (100%)

diff --git a/configure b/configure
index d2db93e..2b5170d 100755
--- a/configure
+++ b/configure
@@ -76,6 +76,7 @@ my %options = (
 	prefix => \$prefix,
 	sbindir => \$sbindir,
 	sharedir => \$sharedir,
+	mibdir => \$mibdir,
 	confdir => \$confdir,
 	conffile => \$conffile,
 	fence_agents => \$fence_agents,
@@ -141,6 +142,7 @@ my $err = &GetOptions (\%options,
 		    'prefix=s',
 		    'sbindir=s',
 		    'sharedir=s',
+		    'mibdir=s',
 		    'confdir=s',
 		    'conffile=s',
 		    'somajor=s',
@@ -176,6 +178,7 @@ if ($help || !$err) {
   print "--libdir=\tthe base directory for libraries.  (Default: {prefix}/lib)\n";
   print "--libexecdir=\tthe base directory for executable components.  (Default: {prefix}/libexec)\n";
   print "--sharedir=\tthe base directory for misc cluster files.  (Default: {prefix}/share/cluster)\n";
+  print "--mibdir=\tthe base directory for snmp mibs.  (Default: {prefix}/share/snmp/mibs)\n";
   print "--confdir=\tthe cluster config directory.  (Default: /etc/cluster)\n";
   print "--conffile=\tthe cluster config file.  (Default: cluster.conf)\n";
   print "--mandir=\tthe base directory for man pages.  (Default: {prefix}/share/man)\n";
@@ -485,6 +488,9 @@ if (!$sbindir) {
 if (!$sharedir) {
   $sharedir="${prefix}/share/cluster";
 }
+if (!$mibdir) {
+  $mibdir="${prefix}/share/snmp/mibs";
+}
 if (!$confdir) {
   $confdir="/etc/cluster";
 }
@@ -605,6 +611,7 @@ while (<IFILE>) {
   $_ =~ s/\ MANDIR\@/$mandir/;
   $_ =~ s/\ SBINDIR\@/$sbindir/;
   $_ =~ s/\ SHAREDIR\@/$sharedir/;
+  $_ =~ s/\ MIBDIR\@/$mibdir/;
   $_ =~ s/\ CONFDIR\@/$confdir/;
   $_ =~ s/\ CONFFILE\@/$conffile/;
   $_ =~ s/\ FENCE_AGENTS\@/$fence_agents/;
diff --git a/fence/agents/apc/Makefile b/fence/agents/apc_snmp/Makefile
similarity index 93%
copy from fence/agents/apc/Makefile
copy to fence/agents/apc_snmp/Makefile
index 7292eb8..136bf11 100644
--- a/fence/agents/apc/Makefile
+++ b/fence/agents/apc_snmp/Makefile
@@ -11,7 +11,8 @@
 ###############################################################################
 ###############################################################################
 
-TARGET= fence_apc
+TARGET= fence_apc_snmp
+MIBRESOURCE= powernet369.mib
 
 include ../../../make/defines.mk
 include $(OBJDIR)/make/fencepy.mk
diff --git a/fence/agents/apc/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
similarity index 99%
rename from fence/agents/apc/fence_apc_snmp.py
rename to fence/agents/apc_snmp/fence_apc_snmp.py
index 4bb02d4..f3f18e1 100755
--- a/fence/agents/apc/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -14,7 +14,7 @@
 ## This APC Fence script uses snmp to control the APC power
 ## switch. This script requires that net-snmp-utils be installed
 ## on all nodes in the cluster, and that the powernet369.mib file be
-## located in /usr/share/snmp/mibs/
+## located in @MIBDIR@
 #############################################################################
 #############################################################################
 
@@ -67,8 +67,8 @@ def main():
   status_check = False
   verbose = False
 
-  if not glob('/usr/share/snmp/mibs/powernet*.mib'):
-    sys.stderr.write('This APC Fence script uses snmp to control the APC power switch. This script requires that net-snmp-utils be installed on all nodes in the cluster, and that the powernet369.mib file be located in /usr/share/snmp/mibs/\n')
+  if not glob('@MIBDIR@/powernet*.mib'):
+    sys.stderr.write('This APC Fence script uses snmp to control the APC power switch. This script requires that net-snmp-utils be installed on all nodes in the cluster, and that the powernet369.mib file be located in @MIBDIR \n')
     sys.exit(1)
 
   if len(sys.argv) > 1:
diff --git a/fence/agents/apc/powernet369.mib b/fence/agents/apc_snmp/powernet369.mib
similarity index 100%
rename from fence/agents/apc/powernet369.mib
rename to fence/agents/apc_snmp/powernet369.mib
diff --git a/make/defines.mk.input b/make/defines.mk.input
index 3f3f0e5..090b449 100644
--- a/make/defines.mk.input
+++ b/make/defines.mk.input
@@ -19,6 +19,7 @@ sharedir ?= ${DESTDIR} SHAREDIR@
 mandir ?= ${DESTDIR} MANDIR@
 module_dir ?= @MODULE_DIR@
 incdir ?= ${DESTDIR} INCDIR@
+mibdir ?= ${DESTDIR} MIBDIR@
 
 # Build information
 
diff --git a/make/fencepy.mk b/make/fencepy.mk
index 26ed29e..500b8b9 100644
--- a/make/fencepy.mk
+++ b/make/fencepy.mk
@@ -14,5 +14,9 @@ $(TARGET):
 	echo "BUILD_DATE=\"(built `date`)\";" >> $(TARGET)
 	awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(S)/$(TARGET).py >> $(TARGET)
 	chmod +x $(TARGET)
+ifdef MIBRESOURCE
+	echo ${mibdir}
+	sed -i -e 's# MIBDIR@#${mibdir}#g' $(TARGET)
+endif
 
 clean: generalclean
diff --git a/make/install.mk b/make/install.mk
index e954e85..6c43538 100644
--- a/make/install.mk
+++ b/make/install.mk
@@ -47,3 +47,7 @@ ifdef KHEADT
 	install -d ${incdir}/linux
 	install -m644 ${KHEADT} ${incdir}/linux
 endif
+ifdef MIBRESOURCE
+	install -d ${mibdir}
+	install -m644 $(S)/${MIBRESOURCE} ${mibdir}
+endif
diff --git a/make/uninstall.mk b/make/uninstall.mk
index 14e575b..544ec68 100644
--- a/make/uninstall.mk
+++ b/make/uninstall.mk
@@ -29,3 +29,6 @@ endif
 ifdef KHEADT
 	${UNINSTALL} ${KHEADT} ${incdir}/linux
 endif
+ifdef MIBRESOURCE
+	${UNINSTALL} ${MIBRESOURCE} ${mibdir}
+endif


hooks/post-receive
--
Cluster Project


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]