public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* resource-agents: master - resource-agents: Tweak environment for SAP resource agents
@ 2009-02-26 19:57 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-02-26 19:57 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=17029d8d348fad4aa01fae39189903b9d727e16c
Commit:        17029d8d348fad4aa01fae39189903b9d727e16c
Parent:        787c4e1893044a6a47473996cdb197d59c995445
Author:        Mark Hlawatschek <hlawatschek@atix.de>
AuthorDate:    Thu Feb 26 14:55:39 2009 -0500
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Thu Feb 26 14:55:39 2009 -0500

resource-agents: Tweak environment for SAP resource agents

rhbz479708

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/resources/SAPDatabase |   19 ++++++++++++++-----
 rgmanager/src/resources/SAPInstance |   14 +++++++++-----
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index 462d543..4733f33 100644
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -37,10 +37,14 @@
 #######################################################################
 # Initialization:
 
-if [ -f ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs ]; then
-        . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
-elif [ -f /usr/share/cluster/ocf-shellfuncs ]; then
-        . /usr/share/cluster/ocf-shellfuncs
+if [ -f $(dirname $0)/.ocf-shellfuncs ]; then
+        . $(dirname $0)/.ocf-shellfuncs
+elif [ -f $(dirname $0)/ocf-shellfuncs ]; then
+        LC_ALL=C
+        LANG=C
+        PATH=/bin:/sbin:/usr/bin:/usr/sbin
+        export LC_ALL LANG PATH
+        . $(dirname $0)/ocf-shellfuncs
 else
         echo Could not find ocf-shellfuncs!
         exit 1
@@ -64,6 +68,7 @@ usage() {
 	The 'stop' operation stops the instance.
 	The 'status' operation reports whether the instance is running
 	The 'monitor' operation reports whether the instance seems to be working
+	The 'recover' operation tries to recover the instance after a crash (instance will be stopped first!)
 	The 'validate-all' operation reports whether the parameters are valid
 	The 'methods' operation reports on the methods $0 supports
 
@@ -75,7 +80,7 @@ meta_data() {
 <?xml version="1.0"?>
 <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
 <resource-agent name="SAPDatabase">
-<version>1.92</version>
+<version>1.92.1</version>
 
 <longdesc lang="en">
 Resource script for SAP databases. It manages a SAP database of any type as an HA resource.
@@ -516,6 +521,7 @@ sapdatabase_methods() {
 	stop
 	status
 	monitor
+	recover
 	validate-all
 	methods
 	meta-data
@@ -992,6 +998,9 @@ case "$1" in
                 sapdatabase_status
                 exit $?;;
 
+  recover)      sapdatabase_recover
+                exit $?;;
+
   validate-all)	sapdatabase_validate
 		exit $?;;
 
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index d04fcb3..c04886f 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -31,10 +31,14 @@
 #######################################################################
 # Initialization:
 
-if [ -f ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs ]; then
-        . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
-elif [ -f /usr/share/cluster/ocf-shellfuncs ]; then
-        . /usr/share/cluster/ocf-shellfuncs
+if [ -f $(dirname $0)/.ocf-shellfuncs ]; then
+        . $(dirname $0)/.ocf-shellfuncs
+elif [ -f $(dirname $0)/ocf-shellfuncs ]; then
+        LC_ALL=C
+        LANG=C
+        PATH=/bin:/sbin:/usr/bin:/usr/sbin
+        export LC_ALL LANG PATH
+        . $(dirname $0)/ocf-shellfuncs
 else
         echo Could not find ocf-shellfuncs!
         exit 1
@@ -68,7 +72,7 @@ meta_data() {
 <?xml version="1.0"?>
 <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
 <resource-agent name="SAPInstance">
-<version>1.92</version>
+<version>1.92.1</version>
 
 <longdesc lang="en">
 Resource script for SAP. It manages a SAP Instance as an HA resource.


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

only message in thread, other threads:[~2009-02-26 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-26 19:57 resource-agents: master - resource-agents: Tweak environment for SAP resource agents Lon Hohberger

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