Bug#487167: heartbeat: more bashisms

2008-07-01 Thread Simon Horman
tag 487167 +pending
thanks

On Sun, Jun 29, 2008 at 11:08:36AM +0200, Luca Falavigna wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Attached patch fixes some more bashisms.

Thanks.

These changes have been included in either the patch you provided for
#487167, which has now been committed upstream, or upstream patch
ed0972c7aa43.

http://hg.linux-ha.org/dev/rev/ed0972c7aa43

These changes should all appear in the next release.

-- 
Horms




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#487167: heartbeat: more bashisms

2008-07-01 Thread Simon Horman
On Tue, Jul 01, 2008 at 09:07:16PM +1000, Simon Horman wrote:
 tag 487167 +pending
 thanks
 
 On Sun, Jun 29, 2008 at 11:08:36AM +0200, Luca Falavigna wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
  
  Attached patch fixes some more bashisms.
 
 Thanks.
 
 These changes have been included in either the patch you provided for
 #487167, which has now been committed upstream, or upstream patch
 ed0972c7aa43.
 
 http://hg.linux-ha.org/dev/rev/ed0972c7aa43
 
 These changes should all appear in the next release.

Sorry, I was confused. Of course this is #487167 :-)

-- 
Horms




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#487167: heartbeat: more bashisms

2008-06-29 Thread Luca Falavigna
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Attached patch fixes some more bashisms.

- --
Luca Falavigna
Ubuntu MOTU Developer
GPG Key: 0x86BC2A50
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIZ1EUnXjXEYa8KlARAiHUAJ4uREJ3ZTupFpMh2wdGFjMiBnN9LwCeINP6
qbmyN6ptenUyp7angHDYCAM=
=25F4
-END PGP SIGNATURE-
diff -ruN heartbeat-2.1.3.orig/resources/OCF/Filesystem heartbeat-2.1.3/resources/OCF/Filesystem
--- heartbeat-2.1.3.orig/resources/OCF/Filesystem	2007-12-21 16:32:27.0 +0100
+++ heartbeat-2.1.3/resources/OCF/Filesystem	2008-06-19 22:50:15.0 +0200
@@ -188,7 +188,7 @@
 }
 
 determine_blockdevice() {
-	if [ $blockdevice == yes ]; then
+	if [ $blockdevice = yes ]; then
 		return
 	fi
 
@@ -301,7 +301,7 @@
 	else
 		OCFS2_CLUSTER=$(find $OCFS2_CONFIGFS -maxdepth 1 -mindepth 1 -type d -printf %f 2/dev/null)
 		set -- $OCFS2_CLUSTER
-		local n=$#
+		local n; n=$#
 		if [ $n -gt 1 ]; then
 			ocf_log err $OCFS2_CLUSTER: several clusters found.
 			exit $OCF_ERR_GENERIC
@@ -453,11 +453,11 @@
 		return $OCF_ERR_UNIMPLEMENTED
 	fi
 
-	local n_type=$OCF_RESKEY_CRM_meta_notify_type
-	local n_op=$OCF_RESKEY_CRM_meta_notify_operation
-	local n_active=$OCF_RESKEY_CRM_meta_notify_active_uname
-	local n_stop=$OCF_RESKEY_CRM_meta_notify_stop_uname
-	local n_start=$OCF_RESKEY_CRM_meta_notify_start_uname
+	local n_type; n_type=$OCF_RESKEY_CRM_meta_notify_type
+	local n_op; n_op=$OCF_RESKEY_CRM_meta_notify_operation
+	local n_active; n_active=$OCF_RESKEY_CRM_meta_notify_active_uname
+	local n_stop; n_stop=$OCF_RESKEY_CRM_meta_notify_stop_uname
+	local n_start; n_start=$OCF_RESKEY_CRM_meta_notify_start_uname
 
 	ocf_log info $OCFS2_UUID: notify: $n_type for $n_op
 	ocf_log info $OCFS2_UUID: notify active: $n_active
@@ -506,7 +506,7 @@
 
 	ocf_log info $OCFS2_UUID: post-processed active: $n_active
 
-	local n_myself=${HA_CURHOST:-$(uname -n | tr '[A-Z]' '[a-z]')}
+	local n_myself; n_myself=${HA_CURHOST:-$(uname -n | tr '[A-Z]' '[a-z]')}
 	ocf_log info $OCFS2_UUID: I am node $n_myself.
 
 	case  $n_active  in
@@ -605,7 +605,7 @@
 	if [ X${HOSTOS} = XOpenBSD ];then
 		PIDS=`fstat | grep ${SUB} | awk '{print $3}'`
 		for PID in ${PIDS};do
-			kill -9 ${PID}
+			kill -s 9 ${PID}
 			ocf_log info Sent kill -9 to ${PID}
 		done
 	else
diff -ruN heartbeat-2.1.3.orig/resources/OCF/Xen heartbeat-2.1.3/resources/OCF/Xen
--- heartbeat-2.1.3.orig/resources/OCF/Xen	2007-12-21 16:32:27.0 +0100
+++ heartbeat-2.1.3/resources/OCF/Xen	2008-06-19 22:43:44.0 +0200
@@ -193,7 +193,7 @@
   if [ $? -eq ${OCF_NOT_RUNNING} ];then
 	return ${OCF_NOT_RUNNING}
   fi
-  if [ X${OCF_RESKEY_monitor_scripts} == X ];then
+  if [ X${OCF_RESKEY_monitor_scripts} = X ];then
 	return ${OCF_SUCCESS}
   fi
   for SCRIPT in ${OCF_RESKEY_monitor_scripts};do
diff -ruN heartbeat-2.1.3.orig/lib/plugins/stonith/external/ipmi heartbeat-2.1.3/lib/plugins/stonith/external/ipmi
--- heartbeat-2.1.3.orig/lib/plugins/stonith/external/ipmi	2007-12-21 16:32:27.0 +0100
+++ heartbeat-2.1.3/lib/plugins/stonith/external/ipmi	2008-06-29 10:06:19.0 +0200
@@ -35,11 +35,11 @@
 STATUS=power status
 IPMITOOL=`which ipmitool 2/dev/null`
 
-function have_ipmi() {
+have_ipmi() {
 	test -x ${IPMITOOL}
 }
 
-function do_ipmi() {
+do_ipmi() {
 	have_ipmi || {
 		echo ipmitool not installed
 		return 1