Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 24e278e14a25367b8cb2fce8af484abd > files > 128

cman-2.0.115-96.el5_8.3.src.rpm

From 840cd254516025031f1005c9b5b34e1ea2142990 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac@redhat.com>
Date: Sun, 20 Dec 2009 17:30:13 +0100
Subject: [PATCH] fencing: Version information not shown

Option '-V' (get version info) is not working because attributes where
not properly named, so they result in empty strings.

Resolves: rhbz#549113
---
 fence/agents/lib/fencing.py.py        |    5 +++--
 fence/agents/lib/telnet_ssl.py        |    2 +-
 fence/agents/rsa/fence_rsa.py         |    2 +-
 fence/agents/sanbox2/fence_sanbox2.py |    4 ++--
 fence/agents/virsh/fence_virsh.py     |    2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index fced23c..647011a 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -8,6 +8,7 @@ import sys, getopt, time, os
 import pexpect, re
 import telnetlib
 import atexit
+import __main__
 
 ## do not add code here.
 #BEGIN_VERSION_GENERATION
@@ -706,8 +707,8 @@ def show_docs(options, docs = None):
 		sys.exit(0)
 
 	if options.has_key("-V"):
-		print RELEASE_VERSION, BUILD_DATE
-		print REDHAT_COPYRIGHT
+		print __main__.FENCE_RELEASE_NAME, __main__.BUILD_DATE
+		print __main__.REDHAT_COPYRIGHT
 		sys.exit(0)
 
 def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None):
diff --git a/fence/agents/lib/telnet_ssl.py b/fence/agents/lib/telnet_ssl.py
index 5d0c981..52c9d82 100755
--- a/fence/agents/lib/telnet_ssl.py
+++ b/fence/agents/lib/telnet_ssl.py
@@ -10,7 +10,7 @@ import sys, socket, string, fcntl, os , time
 from OpenSSL import SSL
 
 #BEGIN_VERSION_GENERATION
-RELEASE_VERSION=""
+FENCE_RELEASE_NAME=""
 REDHAT_COPYRIGHT=""
 BUILD_DATE=""
 #END_VERSION_GENERATION
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 9237f67..7611298 100755
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -12,7 +12,7 @@ sys.path.append("/usr/lib/fence")
 from fencing import *
 
 #BEGIN_VERSION_GENERATION
-RELEASE_VERSION="New RSA2 Agent - test release on steroids"
+FENCE_RELEASE_NAME="New RSA2 Agent - test release on steroids"
 REDHAT_COPYRIGHT=""
 BUILD_DATE="March, 2009"
 #END_VERSION_GENERATION
diff --git a/fence/agents/sanbox2/fence_sanbox2.py b/fence/agents/sanbox2/fence_sanbox2.py
index d1e65cf..4581974 100644
--- a/fence/agents/sanbox2/fence_sanbox2.py
+++ b/fence/agents/sanbox2/fence_sanbox2.py
@@ -9,11 +9,11 @@
 #####
 
 import sys, re, pexpect
-sys.path.append("@FENCEAGENTSLIBDIR@")
+sys.path.append("/usr/lib/fence")
 from fencing import *
 
 #BEGIN_VERSION_GENERATION
-RELEASE_VERSION="New Sanbox2 Agent - test release on steroids"
+FENCE_RELEASE_NAME="New Sanbox2 Agent - test release on steroids"
 REDHAT_COPYRIGHT=""
 BUILD_DATE="March, 2008"
 #END_VERSION_GENERATION
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 9174ac6..057a7c6 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -11,7 +11,7 @@ sys.path.append("/usr/lib/fence")
 from fencing import *
 
 #BEGIN_VERSION_GENERATION
-RELEASE_VERSION="Virsh fence agent"
+FENCE_RELEASE_NAME="Virsh fence agent"
 REDHAT_COPYRIGHT=""
 BUILD_DATE=""
 #END_VERSION_GENERATION
-- 
1.6.0.6