public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* fence-agents: master - fence_snmp_*: Add missed sys.path.apend to SNMP agents
@ 2009-03-22 14:22 Jan Friesse
  0 siblings, 0 replies; only message in thread
From: Jan Friesse @ 2009-03-22 14:22 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=38493ef91b33d4ba4e6f4f6d5adebec936ca8c67
Commit:        38493ef91b33d4ba4e6f4f6d5adebec936ca8c67
Parent:        6f873faf451a3c7cb9bb0404a250c5de46d0ade0
Author:        Jan Friesse <jfriesse@redhat.com>
AuthorDate:    Sun Mar 22 15:22:03 2009 +0100
Committer:     Jan Friesse <jfriesse@redhat.com>
CommitterDate: Sun Mar 22 15:22:03 2009 +0100

fence_snmp_*: Add missed sys.path.apend to SNMP agents

If fencing.py and fencing_snmp.py is not installed in
Python's search path, Python based fence agent will fall.
This was (sadly) the case of SNMP based agents.

This patch add sys.path.append to start of file, so
everything should work now.
---
 fence/agents/apc_snmp/fence_apc_snmp.py         |    1 +
 fence/agents/cisco_mds/fence_cisco_mds.py       |    1 +
 fence/agents/ibmblade/fence_ibmblade.py         |    1 +
 fence/agents/ifmib/fence_ifmib.py               |    1 +
 fence/agents/intelmodular/fence_intelmodular.py |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index 8ffd7fc..8cdb169 100644
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -9,6 +9,7 @@
 #    MN:AP7951 HR:B2) - SNMP v1
 
 import sys, re, pexpect
+sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
 
diff --git a/fence/agents/cisco_mds/fence_cisco_mds.py b/fence/agents/cisco_mds/fence_cisco_mds.py
index 177c3b1..76a45d4 100644
--- a/fence/agents/cisco_mds/fence_cisco_mds.py
+++ b/fence/agents/cisco_mds/fence_cisco_mds.py
@@ -7,6 +7,7 @@
 #   with BIOS 1.0.16, kickstart 4.1(1c), system 4.1(1c)
 
 import sys, re, pexpect
+sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
 
diff --git a/fence/agents/ibmblade/fence_ibmblade.py b/fence/agents/ibmblade/fence_ibmblade.py
index 3c9ecf1..073da78 100644
--- a/fence/agents/ibmblade/fence_ibmblade.py
+++ b/fence/agents/ibmblade/fence_ibmblade.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect
+sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
 
diff --git a/fence/agents/ifmib/fence_ifmib.py b/fence/agents/ifmib/fence_ifmib.py
index 766a96d..0f955ac 100644
--- a/fence/agents/ifmib/fence_ifmib.py
+++ b/fence/agents/ifmib/fence_ifmib.py
@@ -9,6 +9,7 @@
 #   Only lance if is visible
 
 import sys, re, pexpect
+sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
 
diff --git a/fence/agents/intelmodular/fence_intelmodular.py b/fence/agents/intelmodular/fence_intelmodular.py
index 8cfa0ae..ea2453a 100644
--- a/fence/agents/intelmodular/fence_intelmodular.py
+++ b/fence/agents/intelmodular/fence_intelmodular.py
@@ -12,6 +12,7 @@
 # Thanks Matthew Kent for original agent and testing.
 
 import sys, re, pexpect
+sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-22 14:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-22 14:22 fence-agents: master - fence_snmp_*: Add missed sys.path.apend to SNMP agents Jan Friesse

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).