Blame SOURCES/bz1128933-exit-reason-string-updates.patch

c608c9
From 49546dca4dc4e19743d01576a954eac990c0cde1 Mon Sep 17 00:00:00 2001
c608c9
From: David Vossel <dvossel@redhat.com>
c608c9
Date: Mon, 25 Aug 2014 15:35:45 -0500
c608c9
Subject: [PATCH 4/4] exit reason string support for the following agents
c608c9
c608c9
CTDB
c608c9
Delay
c608c9
Filesystem
c608c9
IPsrcaddr
c608c9
LVM
c608c9
MailTo
c608c9
Route
c608c9
SendArp
c608c9
Squid
c608c9
Xinetd
c608c9
apache
c608c9
clvm
c608c9
conntrackd
c608c9
dhcpd
c608c9
galera
c608c9
mysql
c608c9
mysql-common.sh
c608c9
named
c608c9
pgsql
c608c9
postfix
c608c9
rsyncd
c608c9
slapd
c608c9
symlink
c608c9
tomcat
c608c9
---
c608c9
 heartbeat/CTDB            | 24 ++++++++---------
c608c9
 heartbeat/Delay           |  2 +-
c608c9
 heartbeat/Filesystem      | 32 +++++++++++-----------
c608c9
 heartbeat/IPsrcaddr       | 14 +++++-----
c608c9
 heartbeat/LVM             | 32 +++++++++++-----------
c608c9
 heartbeat/MailTo          |  4 +--
c608c9
 heartbeat/Route           | 16 +++++------
c608c9
 heartbeat/SendArp         |  4 +--
c608c9
 heartbeat/Squid           | 14 +++++-----
c608c9
 heartbeat/Xinetd          | 12 ++++-----
c608c9
 heartbeat/apache          | 16 +++++------
c608c9
 heartbeat/clvm            | 14 +++++-----
c608c9
 heartbeat/conntrackd      | 14 +++++-----
c608c9
 heartbeat/dhcpd           | 24 ++++++++---------
c608c9
 heartbeat/galera          | 26 +++++++++---------
c608c9
 heartbeat/mysql           | 26 +++++++++---------
c608c9
 heartbeat/mysql-common.sh | 16 +++++------
c608c9
 heartbeat/named           | 16 +++++------
c608c9
 heartbeat/pgsql           | 68 +++++++++++++++++++++++------------------------
c608c9
 heartbeat/postfix         | 22 +++++++--------
c608c9
 heartbeat/rsyncd          | 16 +++++------
c608c9
 heartbeat/slapd           | 24 ++++++++---------
c608c9
 heartbeat/symlink         | 12 ++++-----
c608c9
 heartbeat/tomcat          | 16 +++++------
c608c9
 24 files changed, 232 insertions(+), 232 deletions(-)
c608c9
 mode change 100644 => 100755 heartbeat/clvm
c608c9
 mode change 100644 => 100755 heartbeat/galera
c608c9
 mode change 100644 => 100755 heartbeat/mysql-common.sh
c608c9
c608c9
diff --git a/heartbeat/CTDB b/heartbeat/CTDB
c608c9
index 18e6d0f..d1e8d03 100755
c608c9
--- a/heartbeat/CTDB
c608c9
+++ b/heartbeat/CTDB
c608c9
@@ -520,7 +520,7 @@ ctdb_start() {
c608c9
 	mkdir -p $persistent_db_dir 2>/dev/null
c608c9
 	for pdbase in $(ls $persistent_db_dir/*.tdb.[0-9] 2>/dev/null$) ; do
c608c9
 		/usr/bin/tdbdump $pdbase >/dev/null 2>/dev/null || {
c608c9
-			ocf_log err "Persistent database $pdbase is corrupted!  CTDB will not start."
c608c9
+			ocf_exit_reason "Persistent database $pdbase is corrupted!  CTDB will not start."
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		}
c608c9
 	done
c608c9
@@ -528,7 +528,7 @@ ctdb_start() {
c608c9
 	# Add necessary configuration to smb.conf
c608c9
 	init_smb_conf
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Failed to update $OCF_RESKEY_smb_conf."
c608c9
+		ocf_exit_reason "Failed to update $OCF_RESKEY_smb_conf."
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -563,7 +563,7 @@ ctdb_start() {
c608c9
 		# cleanup smb.conf
c608c9
 		cleanup_smb_conf
c608c9
 		
c608c9
-		ocf_log err "Failed to execute $OCF_RESKEY_ctdbd_binary."
c608c9
+		ocf_exit_reason "Failed to execute $OCF_RESKEY_ctdbd_binary."
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	else
c608c9
 		# Wait a bit for CTDB to stabilize
c608c9
@@ -577,7 +577,7 @@ ctdb_start() {
c608c9
 			if [ $? -ne 0 ]; then
c608c9
 				# CTDB will be running, kill it before returning
c608c9
 				ctdb_stop
c608c9
-				ocf_log err "Can't invoke $OCF_RESKEY_ctdb_binary --socket=$OCF_RESKEY_ctdb_socket status"
c608c9
+				ocf_exit_reason "Can't invoke $OCF_RESKEY_ctdb_binary --socket=$OCF_RESKEY_ctdb_socket status"
c608c9
 				return $OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 			if ! echo $status | grep -qs 'UNHEALTHY (THIS'; then
c608c9
@@ -593,7 +593,7 @@ ctdb_start() {
c608c9
 	# ctdbd will (or can) actually still be running at this point, so kill it
c608c9
 	ctdb_stop
c608c9
 	
c608c9
-	ocf_log err "Timeout waiting for CTDB to stabilize"
c608c9
+	ocf_exit_reason "Timeout waiting for CTDB to stabilize"
c608c9
 	return $OCF_ERR_GENERIC
c608c9
 }
c608c9
 
c608c9
@@ -646,7 +646,7 @@ ctdb_monitor() {
c608c9
 		if echo $status | grep -qs 'Connection refused'; then
c608c9
 			return $OCF_NOT_RUNNING
c608c9
 		else
c608c9
-			ocf_log err "CTDB status call failed: $status"
c608c9
+			ocf_exit_reason "CTDB status call failed: $status"
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -654,7 +654,7 @@ ctdb_monitor() {
c608c9
 		return $OCF_SUCCESS
c608c9
 	fi
c608c9
 
c608c9
-	ocf_log err "CTDB status is bad: $status"
c608c9
+	ocf_exit_reason "CTDB status is bad: $status"
c608c9
 	return $OCF_ERR_GENERIC
c608c9
 }
c608c9
 
c608c9
@@ -667,12 +667,12 @@ ctdb_validate() {
c608c9
 	done
c608c9
 
c608c9
 	if [ -z "$CTDB_SYSCONFIG" ]; then
c608c9
-		ocf_log err "Can't find CTDB config file (expecting /etc/sysconfig/ctdb, /etc/default/ctdb or similar)"
c608c9
+		ocf_exit_reason "Can't find CTDB config file (expecting /etc/sysconfig/ctdb, /etc/default/ctdb or similar)"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
 	if ocf_is_true "$OCF_RESKEY_ctdb_manages_samba" && [ ! -f "$OCF_RESKEY_smb_conf" ]; then
c608c9
-		ocf_log err "Samba config file '$OCF_RESKEY_smb_conf' does not exist."
c608c9
+		ocf_exit_reason "Samba config file '$OCF_RESKEY_smb_conf' does not exist."
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
@@ -681,19 +681,19 @@ ctdb_validate() {
c608c9
 	fi
c608c9
 
c608c9
 	if [ ! -f "$OCF_RESKEY_ctdb_config_dir/nodes" ]; then
c608c9
-		ocf_log err "$OCF_RESKEY_ctdb_config_dir/nodes does not exist."
c608c9
+		ocf_exit_reason "$OCF_RESKEY_ctdb_config_dir/nodes does not exist."
c608c9
 		return $OCF_ERR_ARGS
c608c9
 	fi
c608c9
 
c608c9
 	if [ -z "$OCF_RESKEY_ctdb_recovery_lock" ]; then
c608c9
-		ocf_log err "ctdb_recovery_lock not specified."
c608c9
+		ocf_exit_reason "ctdb_recovery_lock not specified."
c608c9
 		return $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
 	lock_dir=$(dirname "$OCF_RESKEY_ctdb_recovery_lock")
c608c9
 	touch "$lock_dir/$$" 2>/dev/null
c608c9
 	if [ $? != 0 ]; then
c608c9
-		ocf_log err "Directory for lock file '$OCF_RESKEY_ctdb_recovery_lock' does not exist, or is not writable."
c608c9
+		ocf_exit_reason "Directory for lock file '$OCF_RESKEY_ctdb_recovery_lock' does not exist, or is not writable."
c608c9
 		return $OCF_ERR_ARGS
c608c9
 	fi
c608c9
 	rm "$lock_dir/$$"
c608c9
diff --git a/heartbeat/Delay b/heartbeat/Delay
c608c9
index f505391..9cfa939 100755
c608c9
--- a/heartbeat/Delay
c608c9
+++ b/heartbeat/Delay
c608c9
@@ -184,7 +184,7 @@ Delay_Validate_All() {
c608c9
 # _Return_ on validation success
c608c9
 	return $OCF_SUCCESS
c608c9
   else
c608c9
-	echo "Some of the instance parameters are invalid"
c608c9
+	ocf_exit_reason "Some of the instance parameters are invalid"
c608c9
 # _Exit_ on validation failure
c608c9
 	exit $OCF_ERR_ARGS
c608c9
   fi
c608c9
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
c608c9
index 9892b39..3559c93 100755
c608c9
--- a/heartbeat/Filesystem
c608c9
+++ b/heartbeat/Filesystem
c608c9
@@ -480,7 +480,7 @@ fstype_supported()
c608c9
 	# check the if the filesystem support exists again.
c608c9
 	$MODPROBE $support >/dev/null
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Couldn't find filesystem $FSTYPE in /proc/filesystems and failed to load kernal module"
c608c9
+		ocf_exit_reason "Couldn't find filesystem $FSTYPE in /proc/filesystems and failed to load kernal module"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
@@ -497,7 +497,7 @@ fstype_supported()
c608c9
 		sleep 1
c608c9
 	done
c608c9
 
c608c9
-	ocf_log err "Couldn't find filesystem $FSTYPE in /proc/filesystems"
c608c9
+	ocf_exit_reason "Couldn't find filesystem $FSTYPE in /proc/filesystems"
c608c9
 	return $OCF_ERR_INSTALLED
c608c9
 }
c608c9
 
c608c9
@@ -532,7 +532,7 @@ Filesystem_start()
c608c9
 
c608c9
 	if [ $blockdevice = "yes" ]; then
c608c9
 		if [ "$DEVICE" != "/dev/null" -a ! -b "$DEVICE" ] ; then
c608c9
-			ocf_log err "Couldn't find device [$DEVICE]. Expected /dev/??? to exist"
c608c9
+			ocf_exit_reason "Couldn't find device [$DEVICE]. Expected /dev/??? to exist"
c608c9
 			exit $OCF_ERR_INSTALLED
c608c9
 		fi
c608c9
 
c608c9
@@ -547,7 +547,7 @@ Filesystem_start()
c608c9
 			# NOTE: if any errors at all are detected, it returns non-zero
c608c9
 			# if the error is >= 4 then there is a big problem
c608c9
 			if [ $? -ge 4 ]; then
c608c9
-				ocf_log err "Couldn't sucessfully fsck filesystem for $DEVICE"
c608c9
+				ocf_exit_reason "Couldn't sucessfully fsck filesystem for $DEVICE"
c608c9
 				return $OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 		fi
c608c9
@@ -556,7 +556,7 @@ Filesystem_start()
c608c9
 	[ -d "$MOUNTPOINT" ] ||
c608c9
 		ocf_run mkdir -p $MOUNTPOINT
c608c9
 	if [ ! -d "$MOUNTPOINT" ] ; then
c608c9
-		ocf_log err "Couldn't find directory  [$MOUNTPOINT] to use as a mount point"
c608c9
+		ocf_exit_reason "Couldn't find directory  [$MOUNTPOINT] to use as a mount point"
c608c9
 		exit $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
@@ -571,7 +571,7 @@ Filesystem_start()
c608c9
 	esac
c608c9
 
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Couldn't mount filesystem $DEVICE on $MOUNTPOINT"
c608c9
+		ocf_exit_reason "Couldn't mount filesystem $DEVICE on $MOUNTPOINT"
c608c9
 		if [ -n "$OCFS2_SLES10" ]; then
c608c9
 			ocfs2_cleanup
c608c9
 		fi
c608c9
@@ -775,7 +775,7 @@ fs_stop() {
c608c9
 		while [ $cnt -gt 0 ]; do
c608c9
 			try_umount $SUB &&
c608c9
 				return $OCF_SUCCESS
c608c9
-			ocf_log err "Couldn't unmount $SUB; trying cleanup with $sig"
c608c9
+			ocf_exit_reason "Couldn't unmount $SUB; trying cleanup with $sig"
c608c9
 			signal_processes $SUB $sig
c608c9
 			cnt=$((cnt-1))
c608c9
 			sleep 1
c608c9
@@ -826,7 +826,7 @@ Filesystem_stop()
c608c9
 			fs_stop $SUB $timeout
c608c9
 			rc=$?
c608c9
 			if [ $rc -ne $OCF_SUCCESS ]; then
c608c9
-				ocf_log err "Couldn't unmount $SUB, giving up!"
c608c9
+				ocf_exit_reason "Couldn't unmount $SUB, giving up!"
c608c9
 			fi
c608c9
 		done
c608c9
 	fi
c608c9
@@ -893,7 +893,7 @@ Filesystem_monitor_10()
c608c9
 	dd_opts="iflag=direct bs=4k count=1"
c608c9
 	err_output=`dd if=$DEVICE $dd_opts 2>&1 >/dev/null`
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Failed to read device $DEVICE"
c608c9
+		ocf_exit_reason "Failed to read device $DEVICE"
c608c9
 		ocf_log err "dd said: $err_output"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
@@ -916,18 +916,18 @@ Filesystem_monitor_20()
c608c9
 	[ -d "$status_dir" ] || mkdir -p "$status_dir"
c608c9
 	err_output=`echo "${OCF_RESOURCE_INSTANCE}" | dd of=${STATUSFILE} $dd_opts 2>&1`
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Failed to write status file ${STATUSFILE}"
c608c9
+		ocf_exit_reason "Failed to write status file ${STATUSFILE}"
c608c9
 		ocf_log err "dd said: $err_output"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 	test -f ${STATUSFILE}
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Cannot stat the status file ${STATUSFILE}"
c608c9
+		ocf_exit_reason "Cannot stat the status file ${STATUSFILE}"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 	cat ${STATUSFILE} > /dev/null
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Cannot read the status file ${STATUSFILE}"
c608c9
+		ocf_exit_reason "Cannot read the status file ${STATUSFILE}"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 	return $OCF_SUCCESS
c608c9
@@ -945,7 +945,7 @@ Filesystem_monitor()
c608c9
 		10) Filesystem_monitor_10; rc=$?;;
c608c9
 		20) Filesystem_monitor_20; rc=$?;;
c608c9
 		*)
c608c9
-			ocf_log err "unsupported monitor level $OCF_CHECK_LEVEL"
c608c9
+			ocf_exit_reason "unsupported monitor level $OCF_CHECK_LEVEL"
c608c9
 			rc=$OCF_ERR_CONFIGURED
c608c9
 		;;
c608c9
 		esac
c608c9
@@ -1057,7 +1057,7 @@ case $OP in
c608c9
 esac
c608c9
 
c608c9
 if [ x = x"$DEVICE" ]; then
c608c9
-	ocf_log err "Please set OCF_RESKEY_device to the device to be managed"
c608c9
+	ocf_exit_reason "Please set OCF_RESKEY_device to the device to be managed"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
@@ -1069,7 +1069,7 @@ set_blockdevice_var
c608c9
 # But the output of `mount` and /proc/mounts do not.
c608c9
 if [ -z "$OCF_RESKEY_directory" ]; then
c608c9
 	if [ X$OP = "Xstart" -o $blockdevice = "no" ]; then
c608c9
-		ocf_log err "Please specify the directory"
c608c9
+		ocf_exit_reason "Please specify the directory"
c608c9
 		exit $OCF_ERR_CONFIGURED 
c608c9
 	fi
c608c9
 else
c608c9
@@ -1136,7 +1136,7 @@ esac
c608c9
 if [ -n "$OCF_RESKEY_CRM_meta_clone" ]; then
c608c9
 	case $CLUSTERSAFE in
c608c9
 	0)
c608c9
-		ocf_log err "DANGER! $FSTYPE on $DEVICE is NOT cluster-aware!"
c608c9
+		ocf_exit_reason "DANGER! $FSTYPE on $DEVICE is NOT cluster-aware!"
c608c9
 		ocf_log err "DO NOT RUN IT AS A CLONE!"
c608c9
 		ocf_log err "Politely refusing to proceed to avoid data corruption."
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
diff --git a/heartbeat/IPsrcaddr b/heartbeat/IPsrcaddr
c608c9
index e8c0f77..8163c0c 100755
c608c9
--- a/heartbeat/IPsrcaddr
c608c9
+++ b/heartbeat/IPsrcaddr
c608c9
@@ -111,7 +111,7 @@ END
c608c9
 }
c608c9
 
c608c9
 errorexit() {
c608c9
-	ocf_log err "$*"
c608c9
+	ocf_exit_reason "$*"
c608c9
 	exit $OCF_ERR_GENERIC
c608c9
 }
c608c9
 
c608c9
@@ -253,7 +253,7 @@ CheckIP() {
c608c9
 	    ( [ $1 -le 254 ] && [ $2 -le 254 ] && [ $3 -le 254 ] && [ $4 -le 254 ] )
c608c9
 	then
c608c9
 	    if [ $1 -eq 127 ]; then
c608c9
-		ocf_log err "IP address [$ip] is a loopback address, thus can not be preferred source address"
c608c9
+		ocf_exit_reason "IP address [$ip] is a loopback address, thus can not be preferred source address"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	    fi
c608c9
 	else
c608c9
@@ -368,7 +368,7 @@ ip_status() {
c608c9
 
c608c9
 	  case $IF in
c608c9
 	  	lo*)  
c608c9
-		    ocf_log err "IP address [$BASEIP] is served by loopback, thus can not be preferred source address"
c608c9
+		    ocf_exit_reason "IP address [$BASEIP] is served by loopback, thus can not be preferred source address"
c608c9
 		    exit $OCF_ERR_CONFIGURED
c608c9
 		    ;;
c608c9
 		*)return $OCF_SUCCESS;;
c608c9
@@ -394,7 +394,7 @@ srca_validate_all() {
c608c9
 	if CheckIP "$ipaddress"; then
c608c9
 	  : 
c608c9
 	else
c608c9
-	  ocf_log err "Invalid IP address [$ipaddress]"
c608c9
+	  ocf_exit_reason "Invalid IP address [$ipaddress]"
c608c9
 	  exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
@@ -406,7 +406,7 @@ srca_validate_all() {
c608c9
 	if ip_status "$ipaddress"; then
c608c9
 	  :
c608c9
 	else
c608c9
-	  ocf_log err "We are not serving [$ipaddress], hence can not make it a preferred source address"
c608c9
+	  ocf_exit_reason "We are not serving [$ipaddress], hence can not make it a preferred source address"
c608c9
 	  exit $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 }
c608c9
@@ -434,7 +434,7 @@ if
c608c9
   [ -z "$OCF_RESKEY_ipaddress" ]
c608c9
 then
c608c9
 #  usage
c608c9
-  ocf_log err "Please set OCF_RESKEY_ipaddress to the preferred source IP address!"
c608c9
+  ocf_exit_reason "Please set OCF_RESKEY_ipaddress to the preferred source IP address!"
c608c9
   exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
@@ -447,7 +447,7 @@ fi
c608c9
 findif_out=`$FINDIF -C`
c608c9
 rc=$?
c608c9
 [ $rc -ne 0 ] && {
c608c9
-    ocf_log err "[$FINDIF -C] failed"
c608c9
+    ocf_exit_reason "[$FINDIF -C] failed"
c608c9
     exit $rc
c608c9
 }
c608c9
 
c608c9
diff --git a/heartbeat/LVM b/heartbeat/LVM
c608c9
index 27cdfbd..58cbe83 100755
c608c9
--- a/heartbeat/LVM
c608c9
+++ b/heartbeat/LVM
c608c9
@@ -183,8 +183,8 @@ verify_tags_environment()
c608c9
 	# guarantee our tag will be filtered on startup
c608c9
 	##
c608c9
 	if ! lvm dumpconfig activation/volume_list; then
c608c9
-		ocf_log err "LVM: Improper setup detected"
c608c9
-		ocf_log err "The volume_list filter must be initialized in lvm.conf for exclusive activation without clvmd"
c608c9
+		ocf_log err  "LVM: Improper setup detected"
c608c9
+		ocf_exit_reason "The volume_list filter must be initialized in lvm.conf for exclusive activation without clvmd"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -195,7 +195,7 @@ verify_tags_environment()
c608c9
 	##
c608c9
 	if lvm dumpconfig activation/volume_list | grep -e "\"@$OUR_TAG\"" -e "\"${OCF_RESKEY_volgrpname}\""; then
c608c9
 		ocf_log err "LVM:  Improper setup detected"
c608c9
-		ocf_log err "The volume_list in lvm.conf must not contain the cluster tag, \"$OUR_TAG\", or volume group, $OCF_RESKEY_volgrpname"
c608c9
+		ocf_exit_reason "The volume_list in lvm.conf must not contain the cluster tag, \"$OUR_TAG\", or volume group, $OCF_RESKEY_volgrpname"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -283,7 +283,7 @@ strip_tags()
c608c9
 	done
c608c9
 
c608c9
 	if [ ! -z `vgs -o tags --noheadings $OCF_RESKEY_volgrpname | tr -d ' '` ]; then
c608c9
-		ocf_log err "Failed to remove ownership tags from $OCF_RESKEY_volgrpname"
c608c9
+		ocf_exit_reason "Failed to remove ownership tags from $OCF_RESKEY_volgrpname"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -310,7 +310,7 @@ set_tags()
c608c9
 
c608c9
 	vgchange --addtag $OUR_TAG $OCF_RESKEY_volgrpname
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Failed to add ownership tag to $OCF_RESKEY_volgrpname"
c608c9
+		ocf_exit_reason "Failed to add ownership tag to $OCF_RESKEY_volgrpname"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -341,7 +341,7 @@ LVM_status() {
c608c9
 		test "`cd /dev/$1 && ls`" != ""
c608c9
 		rc=$?
c608c9
 		if [ $rc -ne 0 ]; then
c608c9
-			ocf_log err "VG $1 with no logical volumes is not supported by this RA!"
c608c9
+			ocf_exit_reason "VG $1 with no logical volumes is not supported by this RA!"
c608c9
 		fi
c608c9
 	fi
c608c9
 
c608c9
@@ -354,7 +354,7 @@ LVM_status() {
c608c9
 			# If vg is running, make sure the correct tag is present. Otherwise we
c608c9
 			# can not guarantee exclusive activation.
c608c9
 			if ! check_tags; then
c608c9
-				ocf_log err "WARNING: $OCF_RESKEY_volgrpname is active without the cluster tag, \"$OUR_TAG\""
c608c9
+				ocf_exit_reason "WARNING: $OCF_RESKEY_volgrpname is active without the cluster tag, \"$OUR_TAG\""
c608c9
 				rc=$OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 
c608c9
@@ -423,7 +423,7 @@ retry_exclusive_start()
c608c9
 			return $OCF_ERR_GENERIC;;
c608c9
 		*)
c608c9
 			if ! lvchange -an $OCF_RESKEY_volgrpname/$1; then
c608c9
-				ocf_log err "Unable to perform required deactivation of $OCF_RESKEY_volgrpname/$1 before starting"
c608c9
+				ocf_exit_reason "Unable to perform required deactivation of $OCF_RESKEY_volgrpname/$1 before starting"
c608c9
 				return $OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 			;;
c608c9
@@ -482,7 +482,7 @@ LVM_start() {
c608c9
 		: OK Volume $vg activated just fine!
c608c9
 		return $OCF_SUCCESS 
c608c9
 	else
c608c9
-		ocf_log err "LVM: $vg did not activate correctly"
c608c9
+		ocf_exit_reason "LVM: $vg did not activate correctly"
c608c9
 		return $OCF_NOT_RUNNING
c608c9
 	fi
c608c9
 }
c608c9
@@ -511,7 +511,7 @@ LVM_stop() {
c608c9
 		ocf_run vgchange $vgchange_options $vg
c608c9
 		res=$?
c608c9
 		if LVM_status $vg; then
c608c9
-			ocf_log err "LVM: $vg did not stop correctly"
c608c9
+			ocf_exit_reason "LVM: $vg did not stop correctly"
c608c9
 			res=1
c608c9
 		fi
c608c9
 
c608c9
@@ -568,7 +568,7 @@ LVM_validate_all() {
c608c9
 	##
c608c9
 	VGOUT=`vgck ${VOLUME} 2>&1`
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Volume group [$VOLUME] does not exist or contains error! ${VGOUT}"
c608c9
+		ocf_exit_reason "Volume group [$VOLUME] does not exist or contains error! ${VGOUT}"
c608c9
 		exit $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -581,7 +581,7 @@ LVM_validate_all() {
c608c9
 		VGOUT=`vgdisplay -v ${VOLUME} 2>&1`
c608c9
 	fi
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "Volume group [$VOLUME] does not exist or contains error! ${VGOUT}"
c608c9
+		ocf_exit_reason "Volume group [$VOLUME] does not exist or contains error! ${VGOUT}"
c608c9
 		exit $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -597,7 +597,7 @@ LVM_validate_all() {
c608c9
 	# Having cloned lvm resources with exclusive vg activation makes no sense at all.
c608c9
 	##
c608c9
 	if ocf_is_clone; then
c608c9
-		ocf_log_err "cloned lvm resources can not be activated exclusively"
c608c9
+		ocf_exit_reason "cloned lvm resources can not be activated exclusively"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
@@ -616,7 +616,7 @@ LVM_validate_all() {
c608c9
 		# verify is clvmd running
c608c9
 		##
c608c9
 		if ! ps -C clvmd > /dev/null 2>&1; then
c608c9
-			ocf_log err "$OCF_RESKEY_volgrpname has the cluster attribute set, but 'clvmd' is not running"
c608c9
+			ocf_exit_reason "$OCF_RESKEY_volgrpname has the cluster attribute set, but 'clvmd' is not running"
c608c9
 			exit $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 		;;
c608c9
@@ -653,7 +653,7 @@ esac
c608c9
 if 
c608c9
 	[ -z "$OCF_RESKEY_volgrpname" ]
c608c9
 then
c608c9
-	ocf_log err "You must identify the volume group name!"
c608c9
+	ocf_exit_reason "You must identify the volume group name!"
c608c9
 	exit $OCF_ERR_CONFIGURED 
c608c9
 fi
c608c9
 
c608c9
@@ -680,7 +680,7 @@ rc=$?
c608c9
 if
c608c9
 	( [ $rc -ne 0 ] || [ -z "$LVM_VERSION" ] )
c608c9
 then
c608c9
-	ocf_log err "LVM: $1 could not determine LVM version. Try 'vgchange --version' manually and modify $0 ?"
c608c9
+	ocf_exit_reason "LVM: $1 could not determine LVM version. Try 'vgchange --version' manually and modify $0 ?"
c608c9
 	exit $OCF_ERR_INSTALLED
c608c9
 fi
c608c9
 LVM_MAJOR="${LVM_VERSION%%.*}"
c608c9
diff --git a/heartbeat/MailTo b/heartbeat/MailTo
c608c9
index acf6730..3936c39 100755
c608c9
--- a/heartbeat/MailTo
c608c9
+++ b/heartbeat/MailTo
c608c9
@@ -131,7 +131,7 @@ MailToStatus () {
c608c9
 
c608c9
 MailToValidateAll () {
c608c9
 	if [ -z "$MAILCMD" ]; then
c608c9
-		ocf_log err "MAILCMD not set: complain to the packager"
c608c9
+		ocf_exit_reason "MAILCMD not set: complain to the packager"
c608c9
 		exit $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 	check_binary "$MAILCMD"
c608c9
@@ -169,7 +169,7 @@ esac
c608c9
 if 
c608c9
   [ -z "$OCF_RESKEY_email" ]
c608c9
 then
c608c9
-  ocf_log err "At least 1 Email address has to be given!"
c608c9
+  ocf_exit_reason "At least 1 Email address has to be given!"
c608c9
   exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
diff --git a/heartbeat/Route b/heartbeat/Route
c608c9
index 9a49a26..cfed2b0 100755
c608c9
--- a/heartbeat/Route
c608c9
+++ b/heartbeat/Route
c608c9
@@ -174,7 +174,7 @@ route_start() {
c608c9
 	ocf_log info "${OCF_RESOURCE_INSTANCE} Added network route: $route_spec"
c608c9
 	return $OCF_SUCCESS
c608c9
     else
c608c9
-	ocf_log error "${OCF_RESOURCE_INSTANCE} Failed to add network route: $route_spec"
c608c9
+	ocf_exit_reason "${OCF_RESOURCE_INSTANCE} Failed to add network route: $route_spec"
c608c9
     fi
c608c9
     return $OCF_ERR_GENERIC
c608c9
 }
c608c9
@@ -189,7 +189,7 @@ route_stop() {
c608c9
 		ocf_log info "${OCF_RESOURCE_INSTANCE} Removed network route: $route_spec"
c608c9
 		return $OCF_SUCCESS
c608c9
 	    else
c608c9
-		ocf_log error "${OCF_RESOURCE_INSTANCE} Failed to remove network route: $route_spec"
c608c9
+		ocf_exit_reason "${OCF_RESOURCE_INSTANCE} Failed to remove network route: $route_spec"
c608c9
 	    fi
c608c9
 	    ;;
c608c9
 	$OCF_NOT_RUNNING)
c608c9
@@ -224,24 +224,24 @@ route_validate() {
c608c9
     # If we're running as a clone, are the clone meta attrs OK?
c608c9
     if [ "${OCF_RESKEY_CRM_meta_clone}" ]; then
c608c9
 	if [ "${OCF_RESKEY_CRM_meta_clone_node_max}" != 1 ]; then
c608c9
-	    ocf_log error "Misconfigured clone parameters. Must set meta attribute \"clone_node_max\" to 1, got ${OCF_RESKEY_CRM_meta_clone_node_max}."
c608c9
+	    ocf_exit_reason "Misconfigured clone parameters. Must set meta attribute \"clone_node_max\" to 1, got ${OCF_RESKEY_CRM_meta_clone_node_max}."
c608c9
 	    return $OCF_ERR_ARGS
c608c9
 	fi
c608c9
     fi
c608c9
     # Did we get a destination?
c608c9
     if [ -z "${OCF_RESKEY_destination}" ]; then
c608c9
-	ocf_log error "Missing required parameter \"destination\"."
c608c9
+	ocf_exit_reason "Missing required parameter \"destination\"."
c608c9
 	return $OCF_ERR_ARGS
c608c9
     fi
c608c9
     # Did we get either a device or a gateway address?
c608c9
     if [ -z "${OCF_RESKEY_device}" -a -z "${OCF_RESKEY_gateway}" ]; then
c608c9
-	ocf_log error "Must specifiy either \"device\", or \"gateway\", or both."
c608c9
+	ocf_exit_reason "Must specifiy either \"device\", or \"gateway\", or both."
c608c9
 	return $OCF_ERR_ARGS
c608c9
     fi
c608c9
     # If a device has been configured, is it available on this system?
c608c9
     if [ -n "${OCF_RESKEY_device}" ]; then
c608c9
 	if ! ip link show ${OCF_RESKEY_device} >/dev/null 2>&1; then
c608c9
-	    ocf_log error "Network device ${OCF_RESKEY_device} appears not to be available on this system."
c608c9
+	    ocf_exit_reason "Network device ${OCF_RESKEY_device} appears not to be available on this system."
c608c9
 	    # OCF_ERR_ARGS prevents the resource from running anywhere at all,
c608c9
 	    # maybe another node has the interface?
c608c9
             # OCF_ERR_INSTALLED just prevents starting on this particular node.
c608c9
@@ -256,7 +256,7 @@ route_validate() {
c608c9
         # this system?
c608c9
 	if [ -n "${OCF_RESKEY_source}" ]; then
c608c9
 	    if ! ip address show | grep -w ${OCF_RESKEY_source} >/dev/null 2>&1; then
c608c9
-		ocf_log error "Source address ${OCF_RESKEY_source} appears not to be available on this system."
c608c9
+		ocf_exit_reason "Source address ${OCF_RESKEY_source} appears not to be available on this system."
c608c9
 	    # same reason as with _device:
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	    fi
c608c9
@@ -264,7 +264,7 @@ route_validate() {
c608c9
         # If a gateway address has been configured, is it reachable?
c608c9
 	if [ -n "${OCF_RESKEY_gateway}" ]; then
c608c9
 	    if ! ip route get ${OCF_RESKEY_gateway} >/dev/null 2>&1; then
c608c9
-		ocf_log error "Gateway address ${OCF_RESKEY_gateway} is unreachable."
c608c9
+		ocf_exit_reason "Gateway address ${OCF_RESKEY_gateway} is unreachable."
c608c9
 	    # same reason as with _device:
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	    fi
c608c9
diff --git a/heartbeat/SendArp b/heartbeat/SendArp
c608c9
index 675070c..b67404f 100755
c608c9
--- a/heartbeat/SendArp
c608c9
+++ b/heartbeat/SendArp
c608c9
@@ -166,10 +166,10 @@ sendarp_start() {
c608c9
 	# and wait-ing would be equal to not running in
c608c9
 	# background
c608c9
 	($SENDARP $ARGS ||
c608c9
-	    ocf_log err "Could not send gratuitous arps") &
c608c9
+	    ocf_exit_reason "Could not send gratuitous arps") &
c608c9
     else
c608c9
 	$SENDARP $ARGS || {
c608c9
-	    ocf_log err "Could not send gratuitous arps"
c608c9
+	    ocf_exit_reason "Could not send gratuitous arps"
c608c9
 	    rc=$OCF_ERR_GENERIC
c608c9
 	}
c608c9
     fi
c608c9
diff --git a/heartbeat/Squid b/heartbeat/Squid
c608c9
index 28e2db5..70c7c3d 100755
c608c9
--- a/heartbeat/Squid
c608c9
+++ b/heartbeat/Squid
c608c9
@@ -216,7 +216,7 @@ are_pids_sane()
c608c9
 	if [[ "${SQUID_PIDS[1]}" = "${SQUID_PIDS[2]}" ]]; then
c608c9
 		return $OCF_SUCCESS
c608c9
 	else
c608c9
-		ocf_log err "$SQUID_NAME:Pid unmatch"
c608c9
+		ocf_exit_reason "$SQUID_NAME:Pid unmatch"
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 }
c608c9
@@ -253,7 +253,7 @@ monitor_squid()
c608c9
 			"${SQUID_PIDS[0]},${SQUID_PIDS[1]},${SQUID_PIDS[2]}"
c608c9
 		(( trialcount = trialcount + 1 ))
c608c9
 		if (( trialcount > SQUID_CONFIRM_TRIALCOUNT )); then
c608c9
-			ocf_log err "$SQUID_NAME:Inconsistency of processes remains unsolved"
c608c9
+			ocf_exit_reason "$SQUID_NAME:Inconsistency of processes remains unsolved"
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 		sleep 1
c608c9
@@ -348,7 +348,7 @@ fi
c608c9
 
c608c9
 SQUID_CONF="${OCF_RESKEY_squid_conf}"
c608c9
 if [[ -z "$SQUID_CONF" ]]; then
c608c9
-	ocf_log err "SQUID_CONF is not defined"
c608c9
+	ocf_exit_reason "SQUID_CONF is not defined"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
@@ -374,23 +374,23 @@ fi
c608c9
 
c608c9
 SQUID_EXE="${OCF_RESKEY_squid_exe}"
c608c9
 if [[ -z "$SQUID_EXE" ]]; then
c608c9
-	ocf_log err "SQUID_EXE is not defined"
c608c9
+	ocf_exit_reason "SQUID_EXE is not defined"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 if [[ ! -x "$SQUID_EXE" ]]; then
c608c9
-	ocf_log err "$SQUID_EXE is not found"
c608c9
+	ocf_exit_reason "$SQUID_EXE is not found"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
 SQUID_PIDFILE="${OCF_RESKEY_squid_pidfile}"
c608c9
 if [[ -z "$SQUID_PIDFILE" ]]; then
c608c9
-	ocf_log err "SQUID_PIDFILE is not defined"
c608c9
+	ocf_exit_reason "SQUID_PIDFILE is not defined"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
 SQUID_PORT="${OCF_RESKEY_squid_port}"
c608c9
 if [[ -z "$SQUID_PORT" ]]; then
c608c9
-	ocf_log err "SQUID_PORT is not defined"
c608c9
+	ocf_exit_reason "SQUID_PORT is not defined"
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
 fi
c608c9
 
c608c9
diff --git a/heartbeat/Xinetd b/heartbeat/Xinetd
c608c9
index ee2c4fa..212648e 100755
c608c9
--- a/heartbeat/Xinetd
c608c9
+++ b/heartbeat/Xinetd
c608c9
@@ -89,11 +89,11 @@ hup_inetd () {
c608c9
 	if kill -s HUP $pid; then
c608c9
             ocf_log info "asked xinetd to reload by sending SIGHUP to process $pid!"
c608c9
 	else
c608c9
-            ocf_log err "could not send SIGHUP to process $pid!"
c608c9
+            ocf_exit_reason "could not send SIGHUP to process $pid!"
c608c9
             exit $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
     else
c608c9
-	ocf_log err "xinetd process not found!"
c608c9
+	ocf_exit_reason "xinetd process not found!"
c608c9
 	exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 }
c608c9
@@ -161,7 +161,7 @@ xup_usage () {
c608c9
 
c608c9
 xup_validate_all () {
c608c9
     if [ ! -f "$SVCDEF" ]; then
c608c9
-        ocf_log err "service $service missing $SVCDEF"
c608c9
+        ocf_exit_reason "service $service missing $SVCDEF"
c608c9
 	return $OCF_ERR_INSTALLED
c608c9
     fi
c608c9
     return $OCF_SUCCESS
c608c9
@@ -185,7 +185,7 @@ case "$1" in
c608c9
 esac
c608c9
 
c608c9
 if [ -z "$OCF_RESKEY_service" ]; then
c608c9
-    ocf_log err "please define \"service\" parameter"
c608c9
+    ocf_exit_reason "please define \"service\" parameter"
c608c9
     if [ "$1" = "start" ]; then 
c608c9
 	exit $OCF_ERR_CONFIGURED
c608c9
     else
c608c9
@@ -195,7 +195,7 @@ fi
c608c9
 
c608c9
 # Is xinetd running at all
c608c9
 if [ -z "`get_xinetd_pid`" ]; then
c608c9
-    ocf_log err "xinetd not running, we manage just xinetd services, not the daemon itself"
c608c9
+    ocf_exit_reason "xinetd not running, we manage just xinetd services, not the daemon itself"
c608c9
     case "$1" in
c608c9
     stop) exit $OCF_SUCCESS;;
c608c9
     start|monitor|status) exit $OCF_ERR_INSTALLED;;
c608c9
@@ -204,7 +204,7 @@ fi
c608c9
 
c608c9
 # Make sure the OCF_RESKEY_service is a valid xinetd service name
c608c9
 if [ ! -f $SVCDEF ]; then
c608c9
-    ocf_log err "service definition $SVCDEF not found!"
c608c9
+    ocf_exit_reason "service definition $SVCDEF not found!"
c608c9
     if [ "$1" = "start" ]; then 
c608c9
 	exit $OCF_ERR_INSTALLED
c608c9
     else
c608c9
diff --git a/heartbeat/apache b/heartbeat/apache
c608c9
index bee2f97..e7d570f 100755
c608c9
--- a/heartbeat/apache
c608c9
+++ b/heartbeat/apache
c608c9
@@ -272,7 +272,7 @@ apache_stop() {
c608c9
 		kill_stop $ApachePID
c608c9
 
c608c9
 		if ProcessRunning $ApachePID; then
c608c9
-			ocf_log info "$CMD still running ($ApachePID). Killing pid failed."
c608c9
+			ocf_exit_reason "$CMD still running ($ApachePID). Killing pid failed."
c608c9
 			ret=$OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -303,7 +303,7 @@ apache_monitor_10() {
c608c9
 		return $OCF_SUCCESS
c608c9
 	else
c608c9
 		if ! ocf_is_probe; then
c608c9
-			ocf_log err "Failed to access httpd status page."
c608c9
+			ocf_exit_reason "Failed to access httpd status page."
c608c9
 		fi
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
@@ -359,7 +359,7 @@ apache_monitor_basic() {
c608c9
 	fi
c608c9
 
c608c9
 	if ! ocf_is_probe; then
c608c9
-		ocf_log err "Failed to access httpd status page."
c608c9
+		ocf_exit_reason "Failed to access httpd status page."
c608c9
 	fi
c608c9
 	return $OCF_ERR_GENERIC
c608c9
 }
c608c9
@@ -372,7 +372,7 @@ apache_monitor() {
c608c9
 
c608c9
 	ourhttpclient=`findhttpclient`  # we'll need one
c608c9
 	if [ -z "$ourhttpclient" ]; then
c608c9
-		ocf_log err "could not find a http client; make sure that either wget or curl is available"
c608c9
+		ocf_exit_reason "could not find a http client; make sure that either wget or curl is available"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
@@ -574,25 +574,25 @@ apache_validate_all() {
c608c9
 # We are sure to succeed here, since we forced $PORT to be valid in GetParams()
c608c9
 		: OK
c608c9
 	else
c608c9
-		ocf_log err "Port number $PORT is invalid!"
c608c9
+		ocf_exit_reason "Port number $PORT is invalid!"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
 	case $STATUSURL in
c608c9
 		http://*) ;;
c608c9
 		*) 
c608c9
-			ocf_log err "Invalid STATUSURL $STATUSURL"
c608c9
+			ocf_exit_reason "Invalid STATUSURL $STATUSURL"
c608c9
 			return $OCF_ERR_CONFIGURED ;;
c608c9
 	esac
c608c9
 
c608c9
 	if [ ! -x $HTTPD ]; then
c608c9
-		ocf_log err "HTTPD $HTTPD not found or is not an executable!"
c608c9
+		ocf_exit_reason "HTTPD $HTTPD not found or is not an executable!"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
 	if [ ! -f $CONFIGFILE ]; then
c608c9
 # We are sure to succeed here, since we have parsed $CONFIGFILE before getting here
c608c9
-		ocf_log err "Configuration file $CONFIGFILE not found!"
c608c9
+		ocf_exit_reason "Configuration file $CONFIGFILE not found!"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
 
c608c9
diff --git a/heartbeat/clvm b/heartbeat/clvm
c608c9
old mode 100644
c608c9
new mode 100755
c608c9
index 20bb40c..bb2b61c
c608c9
--- a/heartbeat/clvm
c608c9
+++ b/heartbeat/clvm
c608c9
@@ -160,7 +160,7 @@ check_process()
c608c9
 			return $OCF_NOT_RUNNING;;
c608c9
 		*)
c608c9
 			rm -f "$pidfile" > /dev/null 2>&1 
c608c9
-			ocf_log err "Error encountered detecting pid status of $binary"
c608c9
+			ocf_exit_reason "Error encountered detecting pid status of $binary"
c608c9
 			return $OCF_ERR_GENERIC;;
c608c9
 	esac
c608c9
 }
c608c9
@@ -171,7 +171,7 @@ clvmd_status()
c608c9
 	local mirror_rc
c608c9
 	clvmd_validate
c608c9
 	if [ $? -ne $OCF_SUCCESS ]; then
c608c9
-		ocf_log error "Unable to monitor, Environment validation failed."
c608c9
+		ocf_exit_reason "Unable to monitor, Environment validation failed."
c608c9
 		return $?
c608c9
 	fi
c608c9
 
c608c9
@@ -251,7 +251,7 @@ clvmd_stop()
c608c9
 			ocf_log info "Deactivating clustered VG(s):" 
c608c9
 			ocf_run ${LVM_VGCHANGE} -anl $LVM_VGS
c608c9
 			if [ $? -ne 0 ]; then
c608c9
-				ocf_log error "Failed to deactivate volume groups, cluster vglist = $LVM_VGS" 
c608c9
+				ocf_exit_reason "Failed to deactivate volume groups, cluster vglist = $LVM_VGS" 
c608c9
 				return $OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 		fi
c608c9
@@ -259,14 +259,14 @@ clvmd_stop()
c608c9
 		ocf_log info "Signaling $DAEMON to exit"
c608c9
 		killall -TERM $DAEMON
c608c9
 		if [ $? != 0 ]; then
c608c9
-			ocf_log error "Failed to signal -TERM to $DAEMON"
c608c9
+			ocf_exit_reason "Failed to signal -TERM to $DAEMON"
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 
c608c9
 		wait_for_process $DAEMON $CLVMD_TIMEOUT
c608c9
 		rc=$?
c608c9
 		if [ $rc -ne $OCF_SUCCESS ]; then
c608c9
-			ocf_log error "$DAEMON failed to exit"
c608c9
+			ocf_exit_reason "$DAEMON failed to exit"
c608c9
 			return $rc
c608c9
 		fi
c608c9
 
c608c9
@@ -304,7 +304,7 @@ start_process()
c608c9
 		ocf_run $binary_path $opts
c608c9
 		rc=$?
c608c9
 		if [ $rc -ne 0 ]; then
c608c9
-			ocf_log error "Failed to launch $binary_path, exit code $rc"
c608c9
+			ocf_exit_reason "Failed to launch $binary_path, exit code $rc"
c608c9
 			exit $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -332,7 +332,7 @@ clvmd_start()
c608c9
 
c608c9
 	clvmd_validate
c608c9
 	if [ $? -ne $OCF_SUCCESS ]; then
c608c9
-		ocf_log error "Unable to start, Environment validation failed."
c608c9
+		ocf_exit_reason "Unable to start, Environment validation failed."
c608c9
 		return $?
c608c9
 	fi
c608c9
 
c608c9
diff --git a/heartbeat/conntrackd b/heartbeat/conntrackd
c608c9
index 32eab6b..84ea360 100755
c608c9
--- a/heartbeat/conntrackd
c608c9
+++ b/heartbeat/conntrackd
c608c9
@@ -98,7 +98,7 @@ meta_expect()
c608c9
                 # [, not [[, or it won't work ;)
c608c9
                 [ $val $op $expect ] && return
c608c9
         fi
c608c9
-        ocf_log err "meta parameter misconfigured, expected $what $op $expect, but found ${val:-unset}."
c608c9
+        ocf_exit_reason "meta parameter misconfigured, expected $what $op $expect, but found ${val:-unset}."
c608c9
         exit $OCF_ERR_CONFIGURED
c608c9
 }
c608c9
 
c608c9
@@ -123,7 +123,7 @@ conntrackd_monitor() {
c608c9
 		# now see if it acceppts queries
c608c9
 		if ! $OCF_RESKEY_binary -C $OCF_RESKEY_config -s > /dev/null 2>&1; then
c608c9
 			rc=$OCF_ERR_GENERIC
c608c9
-			ocf_log err "conntrackd is running but not responding to queries"
c608c9
+			ocf_exit_reason "conntrackd is running but not responding to queries"
c608c9
 		fi
c608c9
 		if conntrackd_is_master; then
c608c9
 			rc=$OCF_RUNNING_MASTER
c608c9
@@ -154,7 +154,7 @@ conntrackd_start() {
c608c9
 			conntrackd_set_master_score $slave_score
c608c9
 			# -n = request resync from the others
c608c9
 			if ! $OCF_RESKEY_binary -C $OCF_RESKEY_config -n; then
c608c9
-				ocf_log err "$OCF_RESKEY_binary -C $OCF_RESKEY_config -n failed during start."
c608c9
+				ocf_exit_reason "$OCF_RESKEY_binary -C $OCF_RESKEY_config -n failed during start."
c608c9
 				rc=$OCF_ERR_GENERIC
c608c9
 			else
c608c9
 				rc=$OCF_SUCCESS
c608c9
@@ -170,7 +170,7 @@ conntrackd_start() {
c608c9
 			ha_pseudo_resource $statefile stop
c608c9
 			;;
c608c9
 		$OCF_ERR_GENERIC)
c608c9
-			ocf_log err "conntrackd start failed"
c608c9
+			ocf_exit_reason "conntrackd start failed"
c608c9
 			rc=$OCF_ERR_GENERIC
c608c9
 			break
c608c9
 			;;
c608c9
@@ -208,7 +208,7 @@ conntrackd_stop() {
c608c9
 conntrackd_validate_all() {
c608c9
 	check_binary "$OCF_RESKEY_binary"
c608c9
 	if ! [ -e "$OCF_RESKEY_config" ]; then
c608c9
-		ocf_log err "Config FILE $OCF_RESKEY_config does not exist"
c608c9
+		ocf_exit_reason "Config FILE $OCF_RESKEY_config does not exist"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
         meta_expect master-node-max = 1
c608c9
@@ -227,7 +227,7 @@ conntrackd_promote() {
c608c9
 		# -B = send a bulk update on the line
c608c9
 		for parm in c f R B; do
c608c9
 			if ! $OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm; then
c608c9
-				ocf_log err "$OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm failed during promote."
c608c9
+				ocf_exit_reason "$OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm failed during promote."
c608c9
 				rc=$OCF_ERR_GENERIC
c608c9
 				break
c608c9
 			fi
c608c9
@@ -245,7 +245,7 @@ conntrackd_demote() {
c608c9
 		# -n = request a resync from the others
c608c9
 		for parm in t n; do
c608c9
 			if ! $OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm; then
c608c9
-                        	ocf_log err "$OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm failed during demote."
c608c9
+                        	ocf_exit_reason "$OCF_RESKEY_binary -C $OCF_RESKEY_config -$parm failed during demote."
c608c9
                         	rc=$OCF_ERR_GENERIC
c608c9
                         	break
c608c9
                 	fi
c608c9
diff --git a/heartbeat/dhcpd b/heartbeat/dhcpd
c608c9
index 835a788..67b529e 100755
c608c9
--- a/heartbeat/dhcpd
c608c9
+++ b/heartbeat/dhcpd
c608c9
@@ -189,17 +189,17 @@ dhcpd_validate_all() {
c608c9
 	# chroot mode is enabled.
c608c9
 	if ocf_is_true $OCF_RESKEY_chrooted ; then
c608c9
 	    if ! test -e "$OCF_RESKEY_chrooted_path"; then
c608c9
-		ocf_log err "Path $OCF_RESKEY_chrooted_path does not exist."
c608c9
+		ocf_exit_reason "Path $OCF_RESKEY_chrooted_path does not exist."
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	    fi
c608c9
 
c608c9
 	    if test -n "$OCF_RESKEY_chrooted_path/$OCF_RESKEY_config" -a ! -r "$OCF_RESKEY_chrooted_path/$OCF_RESKEY_config"; then
c608c9
-		ocf_log err "Configuration file $OCF_RESKEY_chrooted_path/$OCF_RESKEY_config doesn't exist"
c608c9
+		ocf_exit_reason "Configuration file $OCF_RESKEY_chrooted_path/$OCF_RESKEY_config doesn't exist"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	    fi
c608c9
 	else
c608c9
 	    if test -n "$OCF_RESKEY_config" -a ! -r "$OCF_RESKEY_config"; then
c608c9
-		ocf_log err "Configuration file $OCF_RESKEY_config doesn't exist"
c608c9
+		ocf_exit_reason "Configuration file $OCF_RESKEY_config doesn't exist"
c608c9
 		return $OCF_ERR_INSTALLED
c608c9
 	    fi
c608c9
 	fi
c608c9
@@ -207,7 +207,7 @@ dhcpd_validate_all() {
c608c9
     fi 
c608c9
 
c608c9
     if ! getent passwd $OCF_RESKEY_user >/dev/null 2>&1; then
c608c9
-        ocf_log err "User $OCF_RESKEY_user doesn't exist"
c608c9
+        ocf_exit_reason "User $OCF_RESKEY_user doesn't exist"
c608c9
         return $OCF_ERR_INSTALLED
c608c9
     fi
c608c9
 
c608c9
@@ -264,7 +264,7 @@ dhcpd_initialize_chroot() {
c608c9
     ## If there is no conf file, we can't initialize the chrooted 
c608c9
     ## environment, return with "program not configured"
c608c9
     if ! [ -f $OCF_RESKEY_config ] ; then
c608c9
-	ocf_log err "dhcpd has not been configured."
c608c9
+	ocf_exit_reason "dhcpd has not been configured."
c608c9
 	return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
@@ -283,7 +283,7 @@ dhcpd_initialize_chroot() {
c608c9
 	if [ -e $i ] ; then
c608c9
 	    DEFAULT_FILE_LIST="$DEFAULT_FILE_LIST $i"
c608c9
 	else
c608c9
-	    ocf_log err "include file $i does not exist"
c608c9
+	    ocf_exit_reason "include file $i does not exist"
c608c9
 	    return $OCF_ERR_INSTALLED
c608c9
 	fi
c608c9
     done
c608c9
@@ -299,7 +299,7 @@ dhcpd_initialize_chroot() {
c608c9
 
c608c9
 	# Next, we copy the configuration file into place.
c608c9
 	cp -aL "$i" "$OCF_RESKEY_chrooted_path/${i%/*}/" > /dev/null 2>&1 ||
c608c9
-	    { ocf_log err "could not copy $i to chroot jail"; return $OCF_ERR_GENERIC; }
c608c9
+	    { ocf_exit_reason "could not copy $i to chroot jail"; return $OCF_ERR_GENERIC; }
c608c9
     done
c608c9
 
c608c9
     libdir=$(basename $(echo /var/lib/dhcp/lib*))
c608c9
@@ -328,7 +328,7 @@ dhcpd_initialize_chroot() {
c608c9
     for i in $cplibs ; do
c608c9
 	if [ -s "$i" ]; then
c608c9
 	    cp -pL "$i" "/var/lib/dhcp/$libdir/" ||
c608c9
-		{ ocf_log err "could not copy $i to chroot jail"; return $OCF_ERR_GENERIC; }
c608c9
+		{ ocf_exit_reason "could not copy $i to chroot jail"; return $OCF_ERR_GENERIC; }
c608c9
 	fi
c608c9
     done
c608c9
 
c608c9
@@ -339,7 +339,7 @@ dhcpd_initialize_chroot() {
c608c9
 dhcpd_initialize() {
c608c9
     ## If there is no conf file, we can't start a dhcp service.
c608c9
     if ! [ -f $OCF_RESKEY_config ] ; then
c608c9
-	ocf_log err "dhcpd has not been configured."
c608c9
+	ocf_exit_reason "dhcpd has not been configured."
c608c9
 	return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
@@ -392,10 +392,10 @@ dhcpd_start() {
c608c9
     # Only initialize the chrooted path(s) if chroot mode is enabled.
c608c9
     if ocf_is_true $OCF_RESKEY_chrooted ; then
c608c9
 	dhcpd_initialize_chroot ||
c608c9
-	    { ocf_log err "Could not fully initialize the chroot environment." ; return $OCF_ERR_INSTALLED; }
c608c9
+	    { ocf_exit_reason "Could not fully initialize the chroot environment." ; return $OCF_ERR_INSTALLED; }
c608c9
     else
c608c9
 	dhcpd_initialize ||
c608c9
-	    { ocf_log err "Could not fully initialize the runtime environment." ; return $OCF_ERR_INSTALLED; }
c608c9
+	    { ocf_exit_reason "Could not fully initialize the runtime environment." ; return $OCF_ERR_INSTALLED; }
c608c9
     fi
c608c9
 
c608c9
     dhcpd_validate_all || exit
c608c9
@@ -501,7 +501,7 @@ dhcpd_stop () {
c608c9
 
c608c9
     #If still up
c608c9
     if dhcpd_monitor 2>&1; then
c608c9
-        ocf_log err "dhcpd is still up! Trying kill -s KILL"
c608c9
+        ocf_log notice "dhcpd is still up! Trying kill -s KILL"
c608c9
 
c608c9
 	kill -s SIGKILL `cat $PIDF`
c608c9
     fi
c608c9
diff --git a/heartbeat/galera b/heartbeat/galera
c608c9
old mode 100644
c608c9
new mode 100755
c608c9
index 6d8cf12..54654f8
c608c9
--- a/heartbeat/galera
c608c9
+++ b/heartbeat/galera
c608c9
@@ -318,7 +318,7 @@ is_primary()
c608c9
     fi
c608c9
 
c608c9
     if [ -z "$cluster_status" ]; then
c608c9
-        ocf_log err "Unable to retrieve wsrep_cluster_status, verify check_user '$OCF_RESKEY_check_user' has permissions to view status"
c608c9
+        ocf_exit_reason "Unable to retrieve wsrep_cluster_status, verify check_user '$OCF_RESKEY_check_user' has permissions to view status"
c608c9
     else
c608c9
         ocf_log info "Galera instance wsrep_cluster_status=${cluster_status}"
c608c9
     fi
c608c9
@@ -441,7 +441,7 @@ galera_promote()
c608c9
             ocf_log info "Node <${NODENAME}> is bootstrapping the cluster"
c608c9
             extra_opts="--wsrep-cluster-address=gcomm://"
c608c9
         else
c608c9
-            ocf_log err "Failure, Attempted to promote Master instance of $OCF_RESOURCE_INSTANCE before bootstrap node has been detected."
c608c9
+            ocf_exit_reason "Failure, Attempted to promote Master instance of $OCF_RESOURCE_INSTANCE before bootstrap node has been detected."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
 
c608c9
@@ -451,7 +451,7 @@ galera_promote()
c608c9
     mysql_common_stop
c608c9
     rc=$?
c608c9
     if [ $rc -ne $OCF_SUCCESS ] && [ $rc -ne $OCF_NOT_RUNNING ]; then
c608c9
-        ocf_log err "Failed to stop read-only galera instance during promotion to Master"
c608c9
+        ocf_exit_reason "Failed to stop read-only galera instance during promotion to Master"
c608c9
         return $rc
c608c9
     fi
c608c9
 
c608c9
@@ -467,19 +467,19 @@ galera_promote()
c608c9
     galera_monitor
c608c9
     rc=$?
c608c9
     if [ $rc != $OCF_SUCCESS -a $rc != $OCF_RUNNING_MASTER ]; then
c608c9
-        ocf_log err "Failed initial monitor action"
c608c9
+        ocf_exit_reason "Failed initial monitor action"
c608c9
         return $rc
c608c9
     fi
c608c9
 
c608c9
     is_readonly
c608c9
     if [ $? -eq 0 ]; then
c608c9
-        ocf_log err "Failure. Master instance started in read-only mode, check configuration."
c608c9
+        ocf_exit_reason "Failure. Master instance started in read-only mode, check configuration."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
     is_primary
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "Failure. Master instance started, but is not in Primary mode."
c608c9
+        ocf_exit_reason "Failure. Master instance started, but is not in Primary mode."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -505,7 +505,7 @@ galera_demote()
c608c9
     mysql_common_stop
c608c9
     rc=$?
c608c9
     if [ $rc -ne $OCF_SUCCESS ] && [ $rc -ne $OCF_NOT_RUNNING ]; then
c608c9
-        ocf_log err "Failed to stop Master galera instance during demotion to Master"
c608c9
+        ocf_exit_reason "Failed to stop Master galera instance during demotion to Master"
c608c9
         return $rc
c608c9
     fi
c608c9
 
c608c9
@@ -523,7 +523,7 @@ galera_start()
c608c9
 
c608c9
     echo $OCF_RESKEY_wsrep_cluster_address | grep -q $NODENAME
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "local node <${NODENAME}> must be a member of the wsrep_cluster_address <${OCF_RESKEY_wsrep_cluster_address}>to start this galera instance"
c608c9
+        ocf_exit_reason "local node <${NODENAME}> must be a member of the wsrep_cluster_address <${OCF_RESKEY_wsrep_cluster_address}>to start this galera instance"
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
@@ -532,7 +532,7 @@ galera_start()
c608c9
 
c608c9
     is_readonly
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "Failure. Slave instance did not start correctly in read-only mode, Make sure local galera.cnf does not have wsrep_cluster_address set."
c608c9
+        ocf_exit_reason "Slave instance did not start correctly in read-only mode, Make sure local galera.cnf does not have wsrep_cluster_address set."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -579,7 +579,7 @@ galera_monitor()
c608c9
 
c608c9
     echo $OCF_RESKEY_wsrep_cluster_address | grep -q $NODENAME
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "local node <${NODENAME}> is started, but is not a member of the wsrep_cluster_address <${OCF_RESKEY_wsrep_cluster_address}>"
c608c9
+        ocf_exit_reason "local node <${NODENAME}> is started, but is not a member of the wsrep_cluster_address <${OCF_RESKEY_wsrep_cluster_address}>"
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -587,7 +587,7 @@ galera_monitor()
c608c9
     if [ $? -ne 0 ]; then
c608c9
         is_primary
c608c9
         if [ $? -ne 0 ]; then
c608c9
-            ocf_log err "local node <${NODENAME}> is neither in primary mode nor in read_only mode. Unknown state."
c608c9
+            ocf_exit_reason "local node <${NODENAME}> is neither in primary mode nor in read_only mode. Unknown state."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
 
c608c9
@@ -629,12 +629,12 @@ galera_stop()
c608c9
 galera_validate()
c608c9
 {
c608c9
     if ! ocf_is_ms; then
c608c9
-        ocf_log err "Galera must be configured as a multistate Master/Slave resource."
c608c9
+        ocf_exit_reason "Galera must be configured as a multistate Master/Slave resource."
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
     if [ -z "$OCF_RESKEY_wsrep_cluster_address" ]; then
c608c9
-        ocf_log err "Galera must be configured with a wsrep_cluster_address value."
c608c9
+        ocf_exit_reason "Galera must be configured with a wsrep_cluster_address value."
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
diff --git a/heartbeat/mysql b/heartbeat/mysql
c608c9
index 41287d0..3170065 100755
c608c9
--- a/heartbeat/mysql
c608c9
+++ b/heartbeat/mysql
c608c9
@@ -394,7 +394,7 @@ get_slave_info() {
c608c9
         else
c608c9
             # Instance produced an empty "SHOW SLAVE STATUS" output --
c608c9
             # instance is not a slave
c608c9
-            ocf_log err "check_slave invoked on an instance that is not a replication slave."
c608c9
+            ocf_exit_reason "check_slave invoked on an instance that is not a replication slave."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
 
c608c9
@@ -415,7 +415,7 @@ check_slave() {
c608c9
             # Whoa. Replication ran into an error. This slave has
c608c9
             # diverged from its master. Make sure this resource
c608c9
             # doesn't restart in place.
c608c9
-            ocf_log err "MySQL instance configured for replication, but replication has failed."
c608c9
+            ocf_exit_reason "MySQL instance configured for replication, but replication has failed."
c608c9
             ocf_log err "See $tmpfile for details"
c608c9
 
c608c9
             # Just pull the reader VIP away, killing MySQL here would be pretty evil
c608c9
@@ -454,7 +454,7 @@ check_slave() {
c608c9
             # We don't have a replication SQL thread running. Not a
c608c9
             # good thing. Try to recoved by restarting the SQL thread
c608c9
             # and remove reader vip.  Prevent MySQL restart.
c608c9
-            ocf_log err "MySQL Slave SQL threads currently not running."
c608c9
+            ocf_exit_reason "MySQL Slave SQL threads currently not running."
c608c9
             ocf_log err "See $tmpfile for details"
c608c9
 
c608c9
             # Remove reader vip
c608c9
@@ -472,7 +472,7 @@ check_slave() {
c608c9
             # We're supposed to bail out if we lag too far
c608c9
             # behind. Let's check our lag.
c608c9
             if [ $secs_behind -gt $OCF_RESKEY_max_slave_lag ]; then
c608c9
-                ocf_log err "MySQL Slave is $secs_behind seconds behind master (allowed maximum: $OCF_RESKEY_max_slave_lag)."
c608c9
+                ocf_exit_reason "MySQL Slave is $secs_behind seconds behind master (allowed maximum: $OCF_RESKEY_max_slave_lag)."
c608c9
                 ocf_log err "See $tmpfile for details"
c608c9
 
c608c9
                 # Remove reader vip
c608c9
@@ -507,7 +507,7 @@ check_slave() {
c608c9
         # instance is not a slave
c608c9
         # TODO: Needs to handle when get_slave_info will return too many connections error
c608c9
         rm -f $tmpfile
c608c9
-        ocf_log err "check_slave invoked on an instance that is not a replication slave."
c608c9
+        ocf_exit_reason "check_slave invoked on an instance that is not a replication slave."
c608c9
         exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 }
c608c9
@@ -596,7 +596,7 @@ unset_master(){
c608c9
     ocf_run $MYSQL $MYSQL_OPTIONS_REPL \
c608c9
         -e "STOP SLAVE IO_THREAD"
c608c9
     if [ $? -gt 0 ]; then
c608c9
-        ocf_log err "Error stopping slave IO thread"
c608c9
+        ocf_exit_reason "Error stopping slave IO thread"
c608c9
         exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -620,14 +620,14 @@ unset_master(){
c608c9
     ocf_run $MYSQL $MYSQL_OPTIONS_REPL \
c608c9
         -e "STOP SLAVE"
c608c9
     if [ $? -gt 0 ]; then
c608c9
-        ocf_log err "Error stopping rest slave threads"
c608c9
+        ocf_exit_reason "Error stopping rest slave threads"
c608c9
         exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
     ocf_run $MYSQL $MYSQL_OPTIONS_REPL \
c608c9
         -e "RESET SLAVE;"
c608c9
     if [ $? -gt 0 ]; then
c608c9
-        ocf_log err "Failed to reset slave"
c608c9
+        ocf_exit_reason "Failed to reset slave"
c608c9
         exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 }
c608c9
@@ -737,7 +737,7 @@ mysql_monitor() {
c608c9
         rc=$?
c608c9
 
c608c9
         if [ $rc -ne 0 ]; then
c608c9
-            ocf_log err "Failed to select from $test_table";
c608c9
+            ocf_exit_reason "Failed to select from $test_table";
c608c9
             return $OCF_ERR_GENERIC;
c608c9
         fi
c608c9
     fi
c608c9
@@ -800,7 +800,7 @@ mysql_start() {
c608c9
             set_master
c608c9
             start_slave
c608c9
             if [ $? -ne 0 ]; then
c608c9
-                ocf_log err "Failed to start slave"
c608c9
+                ocf_exit_reason "Failed to start slave"
c608c9
                 return $OCF_ERR_GENERIC
c608c9
             fi
c608c9
         else
c608c9
@@ -823,7 +823,7 @@ mysql_start() {
c608c9
     mysql_monitor
c608c9
     rc=$?
c608c9
     if [ $rc != $OCF_SUCCESS -a $rc != $OCF_RUNNING_MASTER ]; then
c608c9
-        ocf_log err "Failed initial monitor action"
c608c9
+        ocf_exit_reason "Failed initial monitor action"
c608c9
         return $rc
c608c9
     fi
c608c9
 
c608c9
@@ -921,7 +921,7 @@ mysql_notify() {
c608c9
 
c608c9
                 start_slave
c608c9
                 if [ $? -ne 0 ]; then
c608c9
-                    ocf_log err "Failed to start slave"
c608c9
+                    ocf_exit_reason "Failed to start slave"
c608c9
                     return $OCF_ERR_GENERIC
c608c9
                 fi
c608c9
             fi
c608c9
@@ -933,7 +933,7 @@ mysql_notify() {
c608c9
                 ocf_log info "post-demote notification for $demote_host"
c608c9
                 set_read_only on
c608c9
                 if [ $? -ne 0 ]; then
c608c9
-                    ocf_log err "Failed to set read-only";
c608c9
+                    ocf_exit_reason "Failed to set read-only";
c608c9
                     return $OCF_ERR_GENERIC;
c608c9
                 fi
c608c9
 
c608c9
diff --git a/heartbeat/mysql-common.sh b/heartbeat/mysql-common.sh
c608c9
old mode 100644
c608c9
new mode 100755
c608c9
index 5b6a991..a02f8cd
c608c9
--- a/heartbeat/mysql-common.sh
c608c9
+++ b/heartbeat/mysql-common.sh
c608c9
@@ -98,24 +98,24 @@ mysql_common_validate()
c608c9
     check_binary  $OCF_RESKEY_client_binary
c608c9
 
c608c9
     if [ ! -f $OCF_RESKEY_config ]; then
c608c9
-        ocf_log err "Config $OCF_RESKEY_config doesn't exist";
c608c9
+        ocf_exit_reason "Config $OCF_RESKEY_config doesn't exist";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
     if [ ! -d $OCF_RESKEY_datadir ]; then
c608c9
-        ocf_log err "Datadir $OCF_RESKEY_datadir doesn't exist";
c608c9
+        ocf_exit_reason "Datadir $OCF_RESKEY_datadir doesn't exist";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
     getent passwd $OCF_RESKEY_user >/dev/null 2>&1
c608c9
     if [ ! $? -eq 0 ]; then
c608c9
-        ocf_log err "User $OCF_RESKEY_user doesn't exit";
c608c9
+        ocf_exit_reason "User $OCF_RESKEY_user doesn't exit";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
     getent group $OCF_RESKEY_group >/dev/null 2>&1
c608c9
     if [ ! $? -eq 0 ]; then
c608c9
-        ocf_log err "Group $OCF_RESKEY_group doesn't exist";
c608c9
+        ocf_exit_reason "Group $OCF_RESKEY_group doesn't exist";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
@@ -162,7 +162,7 @@ mysql_common_prepare_dirs()
c608c9
         $MYSQL_BINDIR/mysql_install_db --datadir=$OCF_RESKEY_datadir
c608c9
         rc=$?
c608c9
         if [ $rc -ne 0 ] ; then
c608c9
-            ocf_log err "Initialization failed: $rc";
c608c9
+            ocf_exit_reason "Initialization failed: $rc";
c608c9
             exit $OCF_ERR_GENERIC
c608c9
         fi
c608c9
         chown -R $OCF_RESKEY_user:$OCF_RESKEY_group $OCF_RESKEY_datadir
c608c9
@@ -187,7 +187,7 @@ mysql_common_prepare_dirs()
c608c9
     # user
c608c9
     for dir in $pid_dir $socket_dir; do
c608c9
         if ! su -s /bin/sh - $OCF_RESKEY_user -c "test -w $dir"; then
c608c9
-            ocf_log err "Directory $dir is not writable by $OCF_RESKEY_user"
c608c9
+            ocf_exit_reason "Directory $dir is not writable by $OCF_RESKEY_user"
c608c9
             exit $OCF_ERR_PERM;
c608c9
         fi
c608c9
     done
c608c9
@@ -213,7 +213,7 @@ mysql_common_start()
c608c9
     while [ $start_wait = 1 ]; do
c608c9
         if ! ps $pid > /dev/null 2>&1; then
c608c9
             wait $pid
c608c9
-            ocf_log err "MySQL server failed to start (pid=$pid) (rc=$?), please check your installation"
c608c9
+            ocf_exit_reason "MySQL server failed to start (pid=$pid) (rc=$?), please check your installation"
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
         mysql_common_status info
c608c9
@@ -244,7 +244,7 @@ mysql_common_stop()
c608c9
     /bin/kill $pid > /dev/null
c608c9
     rc=$?
c608c9
     if [ $rc != 0 ]; then
c608c9
-        ocf_log err "MySQL couldn't be stopped"
c608c9
+        ocf_exit_reason "MySQL couldn't be stopped"
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
     # stop waiting
c608c9
diff --git a/heartbeat/named b/heartbeat/named
c608c9
index ede22df..2c34a15 100755
c608c9
--- a/heartbeat/named
c608c9
+++ b/heartbeat/named
c608c9
@@ -211,21 +211,21 @@ named_validate_all() {
c608c9
         if ocf_is_probe; then
c608c9
            ocf_log info "Configuration file ${OCF_RESKEY_named_rootdir}/${OCF_RESKEY_named_config} not readable during probe."
c608c9
         else
c608c9
-           ocf_log err "Configuration file ${OCF_RESKEY_named_rootdir}/${OCF_RESKEY_named_config} doesn't exist"
c608c9
+           ocf_exit_reason "Configuration file ${OCF_RESKEY_named_rootdir}/${OCF_RESKEY_named_config} doesn't exist"
c608c9
            return $OCF_ERR_INSTALLED
c608c9
         fi
c608c9
     fi
c608c9
 
c608c9
     getent passwd $OCF_RESKEY_named_user >/dev/null 2>&1
c608c9
     if [ ! $? -eq 0 ]; then
c608c9
-        ocf_log err "User $OCF_RESKEY_named_user doesn't exist";
c608c9
+        ocf_exit_reason "User $OCF_RESKEY_named_user doesn't exist";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
     if [ -z "$OCF_RESKEY_monitor_request" -o \
c608c9
          -z "$OCF_RESKEY_monitor_response" -o \
c608c9
          -z "$OCF_RESKEY_monitor_ip" ]; then
c608c9
-        ocf_log err "None of monitor_request, monitor_response, and monitor_ip can be empty"
c608c9
+        ocf_exit_reason "None of monitor_request, monitor_response, and monitor_ip can be empty"
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi                            
c608c9
          
c608c9
@@ -309,7 +309,7 @@ named_monitor() {
c608c9
 
c608c9
     if [ $? -ne 0 ] || ! echo $output | grep -q '.* has .*address '"$OCF_RESKEY_monitor_response" 
c608c9
     then
c608c9
-       ocf_log err "named didn't answer properly for $OCF_RESKEY_monitor_request."
c608c9
+       ocf_exit_reason "named didn't answer properly for $OCF_RESKEY_monitor_request."
c608c9
        ocf_log err "Expected: $OCF_RESKEY_monitor_response."
c608c9
        ocf_log err "Got: $output"
c608c9
        return $OCF_ERR_GENERIC
c608c9
@@ -356,7 +356,7 @@ named_start() {
c608c9
 
c608c9
     if ! ${OCF_RESKEY_named} -u ${OCF_RESKEY_named_user} $root_dir_opt ${OCF_RESKEY_named_options}
c608c9
     then
c608c9
-        ocf_log err "named failed to start."
c608c9
+        ocf_exit_reason "named failed to start."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
     
c608c9
@@ -368,7 +368,7 @@ named_start() {
c608c9
             echo $pid > ${OCF_RESKEY_named_pidfile}
c608c9
         fi
c608c9
     else
c608c9
-        ocf_log err "named failed to start. Probably error in configuration."
c608c9
+        ocf_exit_reason "named failed to start. Probably error in configuration."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
         
c608c9
@@ -420,7 +420,7 @@ named_stop () {
c608c9
     
c608c9
     #If still up    
c608c9
     if named_status 2>&1; then
c608c9
-        ocf_log err "named is still up! Killing"
c608c9
+        ocf_exit_reason "named is still up! Killing"
c608c9
         kill -9 `cat ${OCF_RESKEY_named_pidfile}`
c608c9
     fi
c608c9
     
c608c9
@@ -460,7 +460,7 @@ then
c608c9
 fi
c608c9
 
c608c9
 if [ `id -u` -ne 0 ]; then
c608c9
-    ocf_log err "$0 must be run as root"
c608c9
+    ocf_exit_reason "$0 must be run as root"
c608c9
     exit $OCF_ERR_GENERIC
c608c9
 fi
c608c9
 
c608c9
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
c608c9
index aea97da..794f85e 100755
c608c9
--- a/heartbeat/pgsql
c608c9
+++ b/heartbeat/pgsql
c608c9
@@ -495,7 +495,7 @@ pgsql_real_start() {
c608c9
     # Check if we need to create a log file
c608c9
     if ! check_log_file $OCF_RESKEY_logfile
c608c9
     then
c608c9
-        ocf_log err "PostgreSQL can't write to the log file: $OCF_RESKEY_logfile"
c608c9
+        ocf_exit_reason "PostgreSQL can't write to the log file: $OCF_RESKEY_logfile"
c608c9
         return $OCF_ERR_PERM
c608c9
     fi
c608c9
 
c608c9
@@ -533,7 +533,7 @@ pgsql_real_start() {
c608c9
         # Probably started.....
c608c9
         ocf_log info "PostgreSQL start command sent."
c608c9
     else
c608c9
-        ocf_log err "Can't start PostgreSQL."
c608c9
+        ocf_exit_reason "Can't start PostgreSQL."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -565,7 +565,7 @@ pgsql_replication_start() {
c608c9
     fi
c608c9
 
c608c9
     if [ -f $PGSQL_LOCK ]; then
c608c9
-        ocf_log err "My data may be inconsistent. You have to remove $PGSQL_LOCK file to force start."
c608c9
+        ocf_exit_reason "My data may be inconsistent. You have to remove $PGSQL_LOCK file to force start."
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -595,7 +595,7 @@ pgsql_promote() {
c608c9
     local rc
c608c9
 
c608c9
     if ! is_replication; then
c608c9
-        ocf_log err "Not in a replication mode."
c608c9
+        ocf_exit_reason "Not in a replication mode."
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
     rm -f ${XLOG_NOTE_FILE}.*
c608c9
@@ -618,7 +618,7 @@ pgsql_promote() {
c608c9
         pgsql_real_start
c608c9
         rc=$?
c608c9
         if [ $rc -ne $OCF_RUNNING_MASTER ]; then
c608c9
-            ocf_log err "Can't start PostgreSQL as primary on promote."
c608c9
+            ocf_exit_reason "Can't start PostgreSQL as primary on promote."
c608c9
             if [ $rc -ne $OCF_SUCCESS ]; then
c608c9
                 change_pgsql_status "$NODENAME" "STOP"
c608c9
             fi
c608c9
@@ -629,7 +629,7 @@ pgsql_promote() {
c608c9
         if [ $? -eq 0 ]; then
c608c9
             ocf_log info "PostgreSQL promote command sent."
c608c9
         else
c608c9
-            ocf_log err "Can't promote PostgreSQL."
c608c9
+            ocf_exit_reason "Can't promote PostgreSQL."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
 
c608c9
@@ -640,7 +640,7 @@ pgsql_promote() {
c608c9
             if [ $rc -eq $OCF_RUNNING_MASTER ]; then
c608c9
                 break;
c608c9
             elif [ $rc -eq $OCF_ERR_GENERIC ]; then
c608c9
-                ocf_log err "Can't promote PostgreSQL."
c608c9
+                ocf_exit_reason "Can't promote PostgreSQL."
c608c9
                 return $rc
c608c9
             fi
c608c9
             sleep 1
c608c9
@@ -660,7 +660,7 @@ pgsql_demote() {
c608c9
     local rc
c608c9
 
c608c9
     if ! is_replication; then
c608c9
-        ocf_log err "Not in a replication mode."
c608c9
+        ocf_exit_reason "Not in a replication mode."
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
@@ -861,7 +861,7 @@ pgsql_real_monitor() {
c608c9
             t)  ocf_log debug "PostgreSQL is running as a hot standby."
c608c9
                 return $OCF_SUCCESS;;
c608c9
 
c608c9
-            *)  ocf_log err "$CHECK_MS_SQL output is $output"
c608c9
+            *)  ocf_exit_reason "$CHECK_MS_SQL output is $output"
c608c9
                 return $OCF_ERR_GENERIC;;
c608c9
         esac
c608c9
     fi
c608c9
@@ -966,7 +966,7 @@ pgsql_pre_promote() {
c608c9
             cmp_location=`printf "$master_baseline\n$my_master_baseline\n" |\
c608c9
                           sort | head -1`
c608c9
             if [ "$cmp_location" != "$my_master_baseline" ]; then
c608c9
-                ocf_log err "My data is newer than new master's one. New master's location : $master_baseline"
c608c9
+                ocf_exit_reason "My data is newer than new master's one. New master's location : $master_baseline"
c608c9
                 $CRM_FAILCOUNT -r $OCF_RESOURCE_INSTANCE -U $NODENAME -v INFINITY
c608c9
                 return $OCF_ERR_GENERIC
c608c9
             fi
c608c9
@@ -1149,7 +1149,7 @@ have_master_right() {
c608c9
 
c608c9
     show_xlog_location
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "Failed to show my xlog location."
c608c9
+        ocf_exit_reason "Failed to show my xlog location."
c608c9
         exit $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -1288,7 +1288,7 @@ set_async_mode_all() {
c608c9
     ocf_log info "Set all nodes into async mode."
c608c9
     runasowner -q err "echo \"synchronous_standby_names = ''\" > \"$REP_MODE_CONF\""
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "Can't set all nodes into async mode."
c608c9
+        ocf_exit_reason "Can't set all nodes into async mode."
c608c9
         return 1
c608c9
     fi
c608c9
     return 0
c608c9
@@ -1339,7 +1339,7 @@ reload_conf() {
c608c9
     if [ $? -eq 0 ]; then
c608c9
         ocf_log info "Reload configuration file."
c608c9
     else
c608c9
-        ocf_log err "Can't reload configuration file."
c608c9
+        ocf_exit_reason "Can't reload configuration file."
c608c9
         return 1
c608c9
     fi
c608c9
 
c608c9
@@ -1359,7 +1359,7 @@ user_recovery_conf() {
c608c9
 make_recovery_conf() {
c608c9
     runasowner "touch $RECOVERY_CONF"
c608c9
     if [ $? -ne 0 ]; then
c608c9
-        ocf_log err "Can't create recovery.conf."
c608c9
+        ocf_exit_reason "Can't create recovery.conf."
c608c9
         return 1
c608c9
     fi
c608c9
 
c608c9
@@ -1492,11 +1492,11 @@ report_psql_error()
c608c9
 
c608c9
     ocf_log $loglevel "PostgreSQL $OCF_RESKEY_pgdb isn't running"
c608c9
     if [ $rc -eq 1 ]; then
c608c9
-        ocf_log err "Fatal error (out of memory, file not found, etc.) occurred while executing the psql command."
c608c9
+        ocf_exit_reason "Fatal error (out of memory, file not found, etc.) occurred while executing the psql command."
c608c9
     elif [ $rc -eq 2 ]; then
c608c9
         ocf_log $loglevel "Connection error (connection to the server went bad and the session was not interactive) occurred while executing the psql command."
c608c9
     elif [ $rc -eq 3 ]; then
c608c9
-        ocf_log err "Script error (the variable ON_ERROR_STOP was set) occurred while executing the psql command."
c608c9
+        ocf_exit_reason "Script error (the variable ON_ERROR_STOP was set) occurred while executing the psql command."
c608c9
     fi
c608c9
 }
c608c9
 
c608c9
@@ -1536,7 +1536,7 @@ node_exist() {
c608c9
 
c608c9
 check_binary2() {
c608c9
     if ! have_binary "$1"; then
c608c9
-        ocf_log err "Setup problem: couldn't find command: $1"
c608c9
+        ocf_exit_reason "Setup problem: couldn't find command: $1"
c608c9
         return 1
c608c9
     fi
c608c9
     return 0
c608c9
@@ -1550,7 +1550,7 @@ check_config() {
c608c9
            ocf_log info "Configuration file is $1 not readable during probe."
c608c9
            rc=1
c608c9
         else
c608c9
-           ocf_log err "Configuration file $1 doesn't exist"
c608c9
+           ocf_exit_reason "Configuration file $1 doesn't exist"
c608c9
            rc=2
c608c9
         fi
c608c9
     fi
c608c9
@@ -1576,7 +1576,7 @@ pgsql_validate_all() {
c608c9
 
c608c9
     getent passwd $OCF_RESKEY_pgdba >/dev/null 2>&1
c608c9
     if [ ! $? -eq 0 ]; then
c608c9
-        ocf_log err "User $OCF_RESKEY_pgdba doesn't exist";
c608c9
+        ocf_exit_reason "User $OCF_RESKEY_pgdba doesn't exist";
c608c9
         return $OCF_ERR_INSTALLED;
c608c9
     fi
c608c9
 
c608c9
@@ -1584,46 +1584,46 @@ pgsql_validate_all() {
c608c9
         ocf_log info "Don't check $OCF_RESKEY_pgdata during probe"
c608c9
     else
c608c9
         if ! runasowner "test -w $OCF_RESKEY_pgdata"; then
c608c9
-            ocf_log err "Directory $OCF_RESKEY_pgdata is not writable by $OCF_RESKEY_pgdba"
c608c9
+            ocf_exit_reason "Directory $OCF_RESKEY_pgdata is not writable by $OCF_RESKEY_pgdba"
c608c9
             return $OCF_ERR_PERM;
c608c9
         fi
c608c9
     fi
c608c9
 
c608c9
     if [ -n "$OCF_RESKEY_monitor_user" -a ! -n "$OCF_RESKEY_monitor_password" ]
c608c9
     then
c608c9
-        ocf_log err "monitor password can't be empty"
c608c9
+        ocf_exit_reason "monitor password can't be empty"
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
     if [ ! -n "$OCF_RESKEY_monitor_user" -a -n "$OCF_RESKEY_monitor_password" ]
c608c9
     then
c608c9
-        ocf_log err "monitor_user has to be set if monitor_password is set"
c608c9
+        ocf_exit_reason "monitor_user has to be set if monitor_password is set"
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
     if is_replication || [ "$OCF_RESKEY_rep_mode" = "slave" ]; then
c608c9
         version=`cat $OCF_RESKEY_pgdata/PG_VERSION`
c608c9
         if [ `printf "$version\n9.1" | sort -n | head -1` != "9.1" ]; then
c608c9
-            ocf_log err "Replication mode needs PostgreSQL 9.1 or higher."
c608c9
+            ocf_exit_reason "Replication mode needs PostgreSQL 9.1 or higher."
c608c9
             return $OCF_ERR_INSTALLED
c608c9
         fi
c608c9
         if [ ! -n "$OCF_RESKEY_master_ip" ]; then
c608c9
-            ocf_log err "master_ip can't be empty."
c608c9
+            ocf_exit_reason "master_ip can't be empty."
c608c9
             return $OCF_ERR_CONFIGURED
c608c9
         fi
c608c9
     fi
c608c9
 
c608c9
     if is_replication; then
c608c9
         if ! ocf_is_ms; then
c608c9
-            ocf_log err "Replication(rep_mode=async or sync) requires Master/Slave configuration."
c608c9
+            ocf_exit_reason "Replication(rep_mode=async or sync) requires Master/Slave configuration."
c608c9
             return $OCF_ERR_CONFIGURED
c608c9
         fi
c608c9
         if [ ! "$OCF_RESKEY_rep_mode" = "sync" -a ! "$OCF_RESKEY_rep_mode" = "async" ]; then
c608c9
-            ocf_log err "Invalid rep_mode : $OCF_RESKEY_rep_mode"
c608c9
+            ocf_exit_reason "Invalid rep_mode : $OCF_RESKEY_rep_mode"
c608c9
             return $OCF_ERR_CONFIGURED
c608c9
         fi
c608c9
         if [ ! -n "$NODE_LIST" ]; then
c608c9
-            ocf_log err "node_list can't be empty."
c608c9
+            ocf_exit_reason "node_list can't be empty."
c608c9
             return $OCF_ERR_CONFIGURED
c608c9
         fi
c608c9
         if [ $check_config_rc -eq 0 ]; then
c608c9
@@ -1641,14 +1641,14 @@ pgsql_validate_all() {
c608c9
             fi
c608c9
         fi
c608c9
         if ! mkdir -p $OCF_RESKEY_tmpdir || ! chown $OCF_RESKEY_pgdba $OCF_RESKEY_tmpdir || ! chmod 700 $OCF_RESKEY_tmpdir; then
c608c9
-            ocf_log err "Can't create directory $OCF_RESKEY_tmpdir or it is not readable by $OCF_RESKEY_pgdba"
c608c9
+            ocf_exit_reason "Can't create directory $OCF_RESKEY_tmpdir or it is not readable by $OCF_RESKEY_pgdba"
c608c9
             return $OCF_ERR_PERM
c608c9
         fi
c608c9
     fi
c608c9
 
c608c9
     if [ "$OCF_RESKEY_rep_mode" = "slave" ]; then
c608c9
         if ocf_is_ms; then
c608c9
-            ocf_log err "Replication(rep_mode=slave) does not support Master/Slave configuration."
c608c9
+            ocf_exit_reason "Replication(rep_mode=slave) does not support Master/Slave configuration."
c608c9
             return $OCF_ERR_CONFIGURED
c608c9
         fi
c608c9
     fi
c608c9
@@ -1683,24 +1683,24 @@ check_log_file() {
c608c9
 check_socket_dir() {
c608c9
     if [ ! -d "$OCF_RESKEY_socketdir" ]; then
c608c9
         if ! mkdir "$OCF_RESKEY_socketdir"; then
c608c9
-            ocf_log err "Can't create directory $OCF_RESKEY_socketdir"
c608c9
+            ocf_exit_reason "Can't create directory $OCF_RESKEY_socketdir"
c608c9
             exit $OCF_ERR_PERM
c608c9
         fi
c608c9
 
c608c9
         if ! chown $OCF_RESKEY_pgdba:`getent passwd \
c608c9
              $OCF_RESKEY_pgdba | cut -d ":" -f 4` "$OCF_RESKEY_socketdir" 
c608c9
         then
c608c9
-            ocf_log err "Can't change ownership for $OCF_RESKEY_socketdir"
c608c9
+            ocf_exit_reason "Can't change ownership for $OCF_RESKEY_socketdir"
c608c9
             exit $OCF_ERR_PERM
c608c9
         fi
c608c9
 
c608c9
         if ! chmod 2775 "$OCF_RESKEY_socketdir"; then
c608c9
-            ocf_log err "Can't change permissions for $OCF_RESKEY_socketdir"
c608c9
+            ocf_exit_reason "Can't change permissions for $OCF_RESKEY_socketdir"
c608c9
             exit $OCF_ERR_PERM
c608c9
         fi
c608c9
     else
c608c9
         if ! runasowner "touch $OCF_RESKEY_socketdir/test.$$"; then
c608c9
-            ocf_log err "$OCF_RESKEY_pgdba can't create files in $OCF_RESKEY_socketdir"
c608c9
+            ocf_exit_reason "$OCF_RESKEY_pgdba can't create files in $OCF_RESKEY_socketdir"
c608c9
             exit $OCF_ERR_PERM
c608c9
         fi
c608c9
         rm $OCF_RESKEY_socketdir/test.$$
c608c9
@@ -1782,7 +1782,7 @@ US=`id -u -n`
c608c9
 
c608c9
 if [ $US != root -a $US != $OCF_RESKEY_pgdba ]
c608c9
 then
c608c9
-    ocf_log err "$0 must be run as root or $OCF_RESKEY_pgdba"
c608c9
+    ocf_exit_reason "$0 must be run as root or $OCF_RESKEY_pgdba"
c608c9
     exit $OCF_ERR_GENERIC
c608c9
 fi
c608c9
 
c608c9
diff --git a/heartbeat/postfix b/heartbeat/postfix
c608c9
index 8619af6..72fc371 100755
c608c9
--- a/heartbeat/postfix
c608c9
+++ b/heartbeat/postfix
c608c9
@@ -134,7 +134,7 @@ postfix_start()
c608c9
     ret=$?
c608c9
 
c608c9
     if [ $ret -ne 0 ]; then
c608c9
-        ocf_log err "Postfix returned error: " $ret
c608c9
+        ocf_exit_reason "Postfix returned error: " $ret
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -165,7 +165,7 @@ postfix_stop()
c608c9
     ret=$?
c608c9
 
c608c9
     if [ $ret -ne 0 ]; then
c608c9
-        ocf_log err "Postfix returned an error while stopping: " $ret
c608c9
+        ocf_exit_reason "Postfix returned an error while stopping: " $ret
c608c9
         return $OCF_ERR_GENERIC
c608c9
     fi
c608c9
 
c608c9
@@ -181,14 +181,14 @@ postfix_stop()
c608c9
     # escalate to abort if we did not stop by now
c608c9
     # @TODO shall we loop here too?
c608c9
     if postfix_running info; then
c608c9
-        ocf_log err "Postfix failed to stop. Escalating to 'abort'."
c608c9
+        ocf_exit_reason "Postfix failed to stop. Escalating to 'abort'."
c608c9
 
c608c9
         $binary $OPTIONS abort >/dev/null 2>&1; ret=$?
c608c9
         sleep 5
c608c9
 
c608c9
         # postfix abort did not succeed
c608c9
         if postfix_running; then
c608c9
-            ocf_log err "Postfix failed to abort."
c608c9
+            ocf_exit_reason "Postfix failed to abort."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
     fi
c608c9
@@ -238,14 +238,14 @@ postfix_validate_all()
c608c9
                 # skip in-depth directory checks if config file isn't readable during probe
c608c9
                 dir_check=false
c608c9
             else
c608c9
-                ocf_log err "Postfix configuration directory '$config_dir' does not exist or is not readable."
c608c9
+                ocf_exit_reason "Postfix configuration directory '$config_dir' does not exist or is not readable."
c608c9
                 return $OCF_ERR_INSTALLED
c608c9
             fi
c608c9
         fi
c608c9
 
c608c9
         alternate_config_directories=`postconf -h alternate_config_directories 2>/dev/null | grep "$config_dir/\?"`
c608c9
         if [ "x$alternate_config_directories" = "x" ]; then
c608c9
-            ocf_log err "Postfix main configuration must contain correct 'alternate_config_directories' parameter."
c608c9
+            ocf_exit_reason "Postfix main configuration must contain correct 'alternate_config_directories' parameter."
c608c9
             return $OCF_ERR_INSTALLED
c608c9
         fi
c608c9
     fi
c608c9
@@ -257,7 +257,7 @@ postfix_validate_all()
c608c9
             if ocf_is_probe; then
c608c9
                 ocf_log info "Postfix queue directory '$queue_dir' not readable during probe."
c608c9
             else
c608c9
-                ocf_log err "Postfix queue directory '$queue_dir' does not exist or is not readable."
c608c9
+                ocf_exit_reason "Postfix queue directory '$queue_dir' does not exist or is not readable."
c608c9
                 return $OCF_ERR_INSTALLED
c608c9
             fi
c608c9
         fi
c608c9
@@ -266,14 +266,14 @@ postfix_validate_all()
c608c9
             data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
c608c9
             data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
c608c9
             if [ $data_dir_count -gt 1 ]; then
c608c9
-            	ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
c608c9
+            	ocf_exit_reason "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
c608c9
                 return $OCF_ERR_INSTALLED
c608c9
             fi
c608c9
             if [ ! -d "$data_dir" ]; then
c608c9
                 if ocf_is_probe; then
c608c9
                     ocf_log info "Postfix data directory '$data_dir' not readable during probe."
c608c9
                 else
c608c9
-                    ocf_log err "Postfix data directory '$data_dir' does not exist or is not readable."
c608c9
+                    ocf_exit_reason "Postfix data directory '$data_dir' does not exist or is not readable."
c608c9
                     return $OCF_ERR_INSTALLED
c608c9
                 fi
c608c9
             fi
c608c9
@@ -287,7 +287,7 @@ postfix_validate_all()
c608c9
                     if ocf_is_probe; then
c608c9
                         ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
c608c9
                     else
c608c9
-                        ocf_log err "Directory '$dir' is not writable by user '$user'."
c608c9
+                        ocf_exit_reason "Directory '$dir' is not writable by user '$user'."
c608c9
                         return $OCF_ERR_PERM;
c608c9
                     fi
c608c9
                 fi
c608c9
@@ -300,7 +300,7 @@ postfix_validate_all()
c608c9
         $binary $OPTIONS check >/dev/null 2>&1
c608c9
         ret=$?
c608c9
         if [ $ret -ne 0 ]; then
c608c9
-            ocf_log err "Postfix 'check' failed: " $ret
c608c9
+            ocf_exit_reason "Postfix 'check' failed: " $ret
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
     fi
c608c9
diff --git a/heartbeat/rsyncd b/heartbeat/rsyncd
c608c9
index b8cdeb7..dfbbea8 100755
c608c9
--- a/heartbeat/rsyncd
c608c9
+++ b/heartbeat/rsyncd
c608c9
@@ -127,7 +127,7 @@ rsyncd_status()
c608c9
 				return $OCF_ERR_GENERIC
c608c9
 			fi
c608c9
 		else
c608c9
-			ocf_log err "PID file empty!"
c608c9
+			ocf_exit_reason "PID file empty!"
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -145,7 +145,7 @@ rsyncd_start()
c608c9
 	if [ $retVal -eq $OCF_SUCCESS ]; then
c608c9
 		exit $OCF_SUCCESS
c608c9
 	elif [ $retVal -ne $OCF_NOT_RUNNING ]; then
c608c9
-		ocf_log err "Error. Unknown status."
c608c9
+		ocf_exit_reason "Error. Unknown status."
c608c9
 		exit $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -164,11 +164,11 @@ rsyncd_start()
c608c9
 	if  grep -v "^#" "$CONF_FILE" | grep "pid file" > /dev/null ; then
c608c9
 		$COMMAND;
c608c9
 		if [ $? -ne 0 ]; then
c608c9
-			ocf_log err "Error. rsycn daemon returned error $?."
c608c9
+			ocf_exit_reason "Error. rsycn daemon returned error $?."
c608c9
 			exit $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	else
c608c9
-		ocf_log err "Error. \"pid file\" entry required in the rsyncd config file by rsyncd OCF RA."
c608c9
+		ocf_exit_reason "Error. \"pid file\" entry required in the rsyncd config file by rsyncd OCF RA."
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -186,7 +186,7 @@ rsyncd_stop()
c608c9
 			if [ $? -ne 0 ]; then
c608c9
 				kill -s KILL $PID
c608c9
 				if [ $? -ne 0 ]; then
c608c9
-					ocf_log err "Error. Could not stop rsync daemon."
c608c9
+					ocf_exit_reason "Error. Could not stop rsync daemon."
c608c9
 					return $OCF_ERR_GENERIC
c608c9
 				fi
c608c9
 			fi
c608c9
@@ -205,18 +205,18 @@ rsyncd_monitor()
c608c9
 rsyncd_validate_all()
c608c9
 {
c608c9
 	if [ -n "$OCF_RESKEY_binpath" -a ! -x "$OCF_RESKEY_binpath" ]; then
c608c9
-		ocf_log err "Binary path $OCF_RESKEY_binpath does not exist."
c608c9
+		ocf_exit_reason "Binary path $OCF_RESKEY_binpath does not exist."
c608c9
 		exit $OCF_ERR_ARGS
c608c9
 	fi
c608c9
 	if [ -n "$OCF_RESKEY_conffile" -a ! -f "$OCF_RESKEY_conffile" ]; then
c608c9
-		ocf_log err "Config file $OCF_RESKEY_conffile does not exist."
c608c9
+		ocf_exit_reason "Config file $OCF_RESKEY_conffile does not exist."
c608c9
 		exit $OCF_ERR_ARGS
c608c9
 	fi
c608c9
 
c608c9
 	if  grep -v "^#" "$CONF_FILE" | grep "pid file" > /dev/null ; then
c608c9
 		:
c608c9
 	else
c608c9
-		ocf_log err "Error. \"pid file\" entry required in the rsyncd config file by rsyncd OCF RA."
c608c9
+		ocf_exit_reason "Error. \"pid file\" entry required in the rsyncd config file by rsyncd OCF RA."
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
diff --git a/heartbeat/slapd b/heartbeat/slapd
c608c9
index ffb40e8..c26b16f 100755
c608c9
--- a/heartbeat/slapd
c608c9
+++ b/heartbeat/slapd
c608c9
@@ -268,7 +268,7 @@ slapd_pid()
c608c9
       return $OCF_SUCCESS
c608c9
     fi
c608c9
 
c608c9
-    ocf_log err "slapd pid file '$pid_file' empty."
c608c9
+    ocf_exit_reason "slapd pid file '$pid_file' empty."
c608c9
     return $OCF_ERR_GENERIC
c608c9
   fi
c608c9
 
c608c9
@@ -316,7 +316,7 @@ slapd_start()
c608c9
   elif [ -f "$config" ]; then
c608c9
     options="$options -f $config"
c608c9
   else
c608c9
-    ocf_log err "slapd configuration '$config' does not exist."
c608c9
+    ocf_exit_reason "slapd configuration '$config' does not exist."
c608c9
     return $OCF_ERR_INSTALLED
c608c9
   fi
c608c9
 
c608c9
@@ -331,7 +331,7 @@ slapd_start()
c608c9
   fi
c608c9
 
c608c9
   if [ $rc -ne 0 ]; then
c608c9
-    ocf_log err "slapd returned error."
c608c9
+    ocf_exit_reason "slapd returned error."
c608c9
 
c608c9
     return $OCF_ERR_GENERIC
c608c9
   fi
c608c9
@@ -366,7 +366,7 @@ slapd_stop()
c608c9
 
c608c9
   terminate $pid TERM $OCF_RESKEY_stop_escalate; rc=$?
c608c9
   if [ $rc -ne 0  ]; then
c608c9
-    ocf_log err "slapd failed to stop. Escalating to KILL."
c608c9
+    ocf_exit_reason "slapd failed to stop. Escalating to KILL."
c608c9
     terminate $pid KILL; rc=$?
c608c9
   fi
c608c9
 
c608c9
@@ -391,12 +391,12 @@ slapd_monitor()
c608c9
   if [ $state -eq $OCF_NOT_RUNNING ]; then
c608c9
     if [ -z "$1" ];then
c608c9
       if ! ocf_is_probe; then
c608c9
-        ocf_log err "slapd process not found."
c608c9
+        ocf_exit_reason "slapd process not found."
c608c9
       fi
c608c9
     fi
c608c9
     return $state
c608c9
   elif [ $state -ne $OCF_SUCCESS ]; then
c608c9
-    ocf_log err "slapd returned error."
c608c9
+    ocf_exit_reason "slapd returned error."
c608c9
     return $state
c608c9
   fi
c608c9
 
c608c9
@@ -427,7 +427,7 @@ slapd_monitor()
c608c9
     if ocf_is_probe; then
c608c9
       ocf_log info "slapd configuration '$config' does not exist during probe."
c608c9
     else
c608c9
-      ocf_log err "slapd configuration '$config' does not exist."
c608c9
+      ocf_exit_reason "slapd configuration '$config' does not exist."
c608c9
       return $OCF_ERR_INSTALLED
c608c9
     fi
c608c9
   fi
c608c9
@@ -447,12 +447,12 @@ slapd_monitor()
c608c9
         ocf_log debug "slapd database with suffix '$suffix' reachable"
c608c9
         ;;
c608c9
       "49")
c608c9
-        ocf_log err "slapd database with suffix '$suffix' unreachable. Invalid credentials."
c608c9
+        ocf_exit_reason "slapd database with suffix '$suffix' unreachable. Invalid credentials."
c608c9
         return $OCF_ERR_CONFIGURED
c608c9
         ;;
c608c9
       *)
c608c9
         if [ -z "$1" ] || [ -n "$1" -a $rc -ne 1 ]; then
c608c9
-          ocf_log err "slapd database with suffix '$suffix' unreachable. exit code ($rc)"
c608c9
+          ocf_exit_reason "slapd database with suffix '$suffix' unreachable. exit code ($rc)"
c608c9
         fi
c608c9
         state=$OCF_ERR_GENERIC
c608c9
         ;;
c608c9
@@ -480,7 +480,7 @@ slapd_validate_all()
c608c9
       if ocf_is_probe; then
c608c9
         ocf_log info "slapd configuration '$config' does not exist during probe."
c608c9
       else
c608c9
-        ocf_log err "slapd configuration '$config' does not exist."
c608c9
+        ocf_exit_reason "slapd configuration '$config' does not exist."
c608c9
         return $OCF_ERR_INSTALLED
c608c9
       fi
c608c9
     fi
c608c9
@@ -489,14 +489,14 @@ slapd_validate_all()
c608c9
   if [ -z "$user" ]; then
c608c9
     user=`id -nu 2>/dev/null`
c608c9
   elif ! id "$user" >/dev/null 2>&1; then
c608c9
-    ocf_log err "slapd user '$user' does not exist"
c608c9
+    ocf_exit_reason "slapd user '$user' does not exist"
c608c9
     return $OCF_ERR_INSTALLED
c608c9
   fi
c608c9
 
c608c9
   if [ -z "$group" ]; then
c608c9
     group=`id -ng 2>/dev/null`
c608c9
   elif ! grep "^$group:" /etc/group >/dev/null 2>&1; then
c608c9
-    ocf_log err "slapd group '$group' does not exist"
c608c9
+    ocf_exit_reason "slapd group '$group' does not exist"
c608c9
     return $OCF_ERR_INSTALLED
c608c9
   fi
c608c9
 
c608c9
diff --git a/heartbeat/symlink b/heartbeat/symlink
c608c9
index 214092d..1e36a9c 100755
c608c9
--- a/heartbeat/symlink
c608c9
+++ b/heartbeat/symlink
c608c9
@@ -117,7 +117,7 @@ symlink_monitor() {
c608c9
         rc=$OCF_NOT_RUNNING
c608c9
     elif [ ! -L  "$OCF_RESKEY_link" ]; then
c608c9
         if [ -z "$OCF_RESKEY_backup_suffix" ]; then
c608c9
-            ocf_log err "$OCF_RESKEY_link exists but is not a symbolic link!"
c608c9
+            ocf_exit_reason "$OCF_RESKEY_link exists but is not a symbolic link!"
c608c9
             exit $OCF_ERR_INSTALLED
c608c9
         else
c608c9
             ocf_log debug "$OCF_RESKEY_link exists but is not a symbolic link, will be moved to ${OCF_RESKEY_link}${OCF_RESKEY_backup_suffix} on start"
c608c9
@@ -128,7 +128,7 @@ symlink_monitor() {
c608c9
         rc=$OCF_SUCCESS
c608c9
     else
c608c9
         if [ -z "$OCF_RESKEY_backup_suffix" ]; then
c608c9
-            ocf_log err "$OCF_RESKEY_link does not point to ${OCF_RESKEY_target}!"
c608c9
+            ocf_exit_reason "$OCF_RESKEY_link does not point to ${OCF_RESKEY_target}!"
c608c9
             exit $OCF_ERR_INSTALLED
c608c9
         else
c608c9
             ocf_log debug "$OCF_RESKEY_link does not point to ${OCF_RESKEY_target}, will be moved to ${OCF_RESKEY_link}${OCF_RESKEY_backup_suffix} on start"
c608c9
@@ -146,7 +146,7 @@ symlink_start() {
c608c9
                 # have errored out. But there is a chance that
c608c9
                 # something else put that file there after
c608c9
                 # symlink_monitor ran.
c608c9
-                ocf_log err "$OCF_RESKEY_link exists and no backup_suffix is set, won't overwrite."
c608c9
+                ocf_exit_reason "$OCF_RESKEY_link exists and no backup_suffix is set, won't overwrite."
c608c9
                 exit $OCF_ERR_GENERIC
c608c9
             else
c608c9
                 ocf_log debug "Found $OCF_RESKEY_link, moving to ${OCF_RESKEY_link}${OCF_RESKEY_backup_suffix}"
c608c9
@@ -174,7 +174,7 @@ symlink_stop() {
c608c9
             fi
c608c9
             return $OCF_SUCCESS
c608c9
         else
c608c9
-            ocf_log err "Removing $OCF_RESKEY_link failed."
c608c9
+            ocf_exit_reason "Removing $OCF_RESKEY_link failed."
c608c9
             return $OCF_ERR_GENERIC
c608c9
         fi
c608c9
     else
c608c9
@@ -184,11 +184,11 @@ symlink_stop() {
c608c9
 
c608c9
 symlink_validate_all() {
c608c9
     if [ "x${OCF_RESKEY_link}" = "x" ]; then
c608c9
-        ocf_log err "Mandatory parameter link is unset"
c608c9
+        ocf_exit_reason "Mandatory parameter link is unset"
c608c9
         exit $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
     if [ "x${OCF_RESKEY_target}" = "x" ]; then
c608c9
-        ocf_log err "Mandatory parameter target is unset"
c608c9
+        ocf_exit_reason "Mandatory parameter target is unset"
c608c9
         exit $OCF_ERR_CONFIGURED
c608c9
     fi
c608c9
 
c608c9
diff --git a/heartbeat/tomcat b/heartbeat/tomcat
c608c9
index 23a7e2f..7b67786 100755
c608c9
--- a/heartbeat/tomcat
c608c9
+++ b/heartbeat/tomcat
c608c9
@@ -157,7 +157,7 @@ rotate_catalina_out()
c608c9
 	su - -s /bin/sh $RESOURCE_TOMCAT_USER \
c608c9
 		-c "touch \"$CATALINA_BASE/logs/catalina_$CURRENT_ROTATELOG_SUFFIX.log\"" > /dev/null 2>&1
c608c9
 	if [ $? -ne 0 ]; then
c608c9
-		ocf_log err "$CATALINA_BASE/logs/catalina_$CURRENT_ROTATELOG_SUFFIX.log is not writable."
c608c9
+		ocf_exit_reason "$CATALINA_BASE/logs/catalina_$CURRENT_ROTATELOG_SUFFIX.log is not writable."
c608c9
 		return $OCF_ERR_GENERIC
c608c9
 	fi
c608c9
 
c608c9
@@ -235,7 +235,7 @@ start_tomcat()
c608c9
 		if [ $? -eq 0 ]; then
c608c9
 			ocf_log debug "Rotate catalina.out succeeded."
c608c9
 		else
c608c9
-			ocf_log err "Rotate catalina.out failed. Avoid starting tomcat without catalina.out rotation."
c608c9
+			ocf_exit_reason "Rotate catalina.out failed. Avoid starting tomcat without catalina.out rotation."
c608c9
 			return $OCF_ERR_GENERIC
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -534,12 +534,12 @@ validate_all_tomcat()
c608c9
 	check_binary $WGET
c608c9
 
c608c9
 	if [ -z "${TOMCAT_START_SCRIPT}" ]; then
c608c9
-		ocf_log err "No default tomcat start script detected. Please specify start script location using the 'tomcat_start_script' option"
c608c9
+		ocf_exit_reason "No default tomcat start script detected. Please specify start script location using the 'tomcat_start_script' option"
c608c9
 		rc=$OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
 	if [ -n "$MAX_STOP_TIME" ] && [ "$MAX_STOP_TIME" -lt 0 ]; then
c608c9
-		ocf_log err "max_stop_time must be set to a value greater than 0."
c608c9
+		ocf_exit_reason "max_stop_time must be set to a value greater than 0."
c608c9
 		rc=$OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
@@ -550,14 +550,14 @@ validate_all_tomcat()
c608c9
 		ocf_log debug "grep port=\"$port\" $CATALINA_BASE/conf/server.xml"
c608c9
 		grep "port=\"$port\"" $CATALINA_BASE/conf/server.xml > /dev/null 2>&1
c608c9
 		if [ $? -ne 0 ]; then
c608c9
-			ocf_log err "Your configured status URL specifies a port ($port), but the server does not have a connector listening to that port in $CATALINA_BASE/conf/server.xml"
c608c9
+			ocf_exit_reason "Your configured status URL specifies a port ($port), but the server does not have a connector listening to that port in $CATALINA_BASE/conf/server.xml"
c608c9
 			rc=$OCF_ERR_INSTALLED
c608c9
 		fi
c608c9
 	fi
c608c9
 
c608c9
 	if ocf_is_true ${CATALINA_ROTATE_LOG}; then
c608c9
 		if [ ! -x "$ROTATELOGS" ]; then
c608c9
-			ocf_log err "rotatelogs command does not exist."
c608c9
+			ocf_exit_reason "rotatelogs command does not exist."
c608c9
 			rc=$OCF_ERR_INSTALLED
c608c9
 		fi
c608c9
 	fi
c608c9
@@ -635,7 +635,7 @@ if [ ! -d "$JAVA_HOME" -o ! -d "$CATALINA_HOME" -o ! -d "$CATALINA_BASE" ]; then
c608c9
 		monitor)	exit	$OCF_NOT_RUNNING;;
c608c9
 		status)		exit	$LSB_STATUS_STOPPED;;
c608c9
 	esac
c608c9
-	ocf_log err "JAVA_HOME or CATALINA_HOME or CATALINA_BASE does not exist."
c608c9
+	ocf_exit_reason "JAVA_HOME or CATALINA_HOME or CATALINA_BASE does not exist."
c608c9
 	exit $OCF_ERR_INSTALLED
c608c9
 fi
c608c9
 
c608c9
@@ -649,7 +649,7 @@ if [ ! -x "$JAVA" ]; then
c608c9
 		monitor)	exit	$OCF_NOT_RUNNING;;
c608c9
 		status)		exit	$LSB_STATUS_STOPPED;;
c608c9
 	esac
c608c9
-	ocf_log err "java command does not exist."
c608c9
+	ocf_exit_reason "java command does not exist."
c608c9
 	exit $OCF_ERR_INSTALLED
c608c9
 fi
c608c9
 
c608c9
-- 
c608c9
1.8.4.2
c608c9