public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: fabbione@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. gfs-kernel_0_1_22-106-g4342c4e
Date: Sat, 29 Mar 2008 05:51:00 -0000	[thread overview]
Message-ID: <20080329055100.13056.qmail@sourceware.org> (raw)

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


                 reply	other threads:[~2008-03-29  5:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080329055100.13056.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).