From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-107-gea3120d
Date: 29 Mar 2008 06:15:43 -0000 [thread overview]
Message-ID: <20080329061543.26819.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=ea3120d55c125797a0423e8e469f96d555b40b2d
The branch, master has been updated
via ea3120d55c125797a0423e8e469f96d555b40b2d (commit)
from 4342c4ed4c1ea1ac52a679ce4a0138fbef416862 (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 ea3120d55c125797a0423e8e469f96d555b40b2d
Author: Fabio M. Di Nitto <fabbione@fabbione.net>
Date: Sat Mar 29 07:14:44 2008 +0100
[FENCE] apc_snmp: allow paths to snmp binaries to be configurable
Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
-----------------------------------------------------------------------
Summary of changes:
configure | 7 +++++++
fence/agents/apc_snmp/fence_apc_snmp.py | 14 +++++++-------
make/defines.mk.input | 1 +
make/fencepy.mk | 2 +-
4 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index 2b5170d..7f97c1f 100755
--- a/configure
+++ b/configure
@@ -77,6 +77,7 @@ my %options = (
sbindir => \$sbindir,
sharedir => \$sharedir,
mibdir => \$mibdir,
+ snmpbin => \$snmpbin,
confdir => \$confdir,
conffile => \$conffile,
fence_agents => \$fence_agents,
@@ -143,6 +144,7 @@ my $err = &GetOptions (\%options,
'sbindir=s',
'sharedir=s',
'mibdir=s',
+ 'snmpbin=s',
'confdir=s',
'conffile=s',
'somajor=s',
@@ -179,6 +181,7 @@ if ($help || !$err) {
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 "--snmpbin=\tthe base directory for snmp binaries (Ex: /usr/bin/snmpwalk). (Default: {prefix}/bin)\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";
@@ -491,6 +494,9 @@ if (!$sharedir) {
if (!$mibdir) {
$mibdir="${prefix}/share/snmp/mibs";
}
+if (!$snmpbin) {
+ $snmpbin="${prefix}/bin";
+}
if (!$confdir) {
$confdir="/etc/cluster";
}
@@ -612,6 +618,7 @@ while (<IFILE>) {
$_ =~ s/\@SBINDIR\@/$sbindir/;
$_ =~ s/\@SHAREDIR\@/$sharedir/;
$_ =~ s/\@MIBDIR\@/$mibdir/;
+ $_ =~ s/\@SNMPBIN\@/$snmpbin/;
$_ =~ s/\@CONFDIR\@/$confdir/;
$_ =~ s/\@CONFFILE\@/$conffile/;
$_ =~ s/\@FENCE_AGENTS\@/$fence_agents/;
diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index f3f18e1..afb0ff9 100755
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -169,7 +169,7 @@ def main():
args_off = list()
args_on = list()
- args_status.append("/usr/bin/snmpget")
+ args_status.append("@SNMPBIN@/snmpget")
args_status.append("-Oqu") #sets printing options
args_status.append("-v")
args_status.append("1")
@@ -180,7 +180,7 @@ def main():
args_status.append(address)
args_status.append(apc_command)
- args_off.append("/usr/bin/snmpset")
+ args_off.append("@SNMPBIN@/snmpset")
args_off.append("-Oqu") #sets printing options
args_off.append("-v")
args_off.append("1")
@@ -193,7 +193,7 @@ def main():
args_off.append("i")
args_off.append("outletOff")
- args_on.append("/usr/bin/snmpset")
+ args_on.append("@SNMPBIN@/snmpset")
args_on.append("-Oqu") #sets printing options
args_on.append("-v")
args_on.append("1")
@@ -235,7 +235,7 @@ def main():
fd.write("Attempting the following command: %s\n" % cmdstr_off)
strr = os.system(cmdstr_off)
time.sleep(1)
- strr,code = execWithCaptureStatus("/usr/bin/snmpget",args_status)
+ strr,code = execWithCaptureStatus("@SNMPBIN@/snmpget",args_status)
if verbose:
fd.write("Result: %s\n" % strr)
fd.close()
@@ -254,7 +254,7 @@ def main():
fd.write("Attempting the following command: %s\n" % cmdstr_on)
strr = os.system(cmdstr_on)
time.sleep(1)
- strr,code = execWithCaptureStatus("/usr/bin/snmpget",args_status)
+ strr,code = execWithCaptureStatus("@SNMPBIN@/snmpget",args_status)
#strr = os.system(cmdstr_status)
if verbose:
fd.write("Result: %s\n" % strr)
@@ -276,7 +276,7 @@ def main():
fd.write("Attempting the following command: %s\n" % cmdstr_off)
strr = os.system(cmdstr_off)
time.sleep(1)
- strr,code = execWithCaptureStatus("/usr/bin/snmpget",args_status)
+ strr,code = execWithCaptureStatus("@SNMPBIN@/snmpget",args_status)
#strr = os.system(cmdstr_status)
if verbose:
fd.write("Result: %s\n" % strr)
@@ -291,7 +291,7 @@ def main():
fd.write("Attempting the following command: %s\n" % cmdstr_on)
strr = os.system(cmdstr_on)
time.sleep(1)
- strr,code = execWithCaptureStatus("/usr/bin/snmpget",args_status)
+ strr,code = execWithCaptureStatus("@SNMPBIN@/snmpget",args_status)
#strr = os.system(cmdstr_status)
if verbose:
fd.write("Result: %s\n" % strr)
diff --git a/make/defines.mk.input b/make/defines.mk.input
index 090b449..1e6f8df 100644
--- a/make/defines.mk.input
+++ b/make/defines.mk.input
@@ -20,6 +20,7 @@ mandir ?= ${DESTDIR}@MANDIR@
module_dir ?= @MODULE_DIR@
incdir ?= ${DESTDIR}@INCDIR@
mibdir ?= ${DESTDIR}@MIBDIR@
+snmpbin ?= @SNMPBIN@
# Build information
diff --git a/make/fencepy.mk b/make/fencepy.mk
index 500b8b9..ea301c4 100644
--- a/make/fencepy.mk
+++ b/make/fencepy.mk
@@ -16,7 +16,7 @@ $(TARGET):
chmod +x $(TARGET)
ifdef MIBRESOURCE
echo ${mibdir}
- sed -i -e 's#@MIBDIR@#${mibdir}#g' $(TARGET)
+ sed -i -e 's#@MIBDIR@#${mibdir}#g' -e 's#@SNMPBIN@#${snmpbin}#g' $(TARGET)
endif
clean: generalclean
hooks/post-receive
--
Cluster Project
reply other threads:[~2008-03-29 6:15 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=20080329061543.26819.qmail@sourceware.org \
--to=fabbione@sourceware.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.