Benoit Donneaux <[EMAIL PROTECTED]> wrote:
> [-- text/plain, encoding 7bit, charset: ISO-8859-1, 27 lines --]
> 
> Hello,
> 
> 
> I'm using heartbeat-2.0.6-1.c4.1.rpm from 
> http://dev.centos.org/centos/4/testing/x86_64/RPMS, and I've got some 
> trouble using IPaddr2 resource :
> 
> /etc/ha.d/resource.d/IPaddr2 192.168.0.1 status
> /usr/lib/ocf/resource.d/heartbeat/IPaddr2: line 277: [: too many arguments
> stopped
> 2006/07/25_12:43:28 INFO: IPaddr2 Resource is stopped
> INFO: IPaddr2 Resource is stopped
> 
> I've noticed SYSTYPE is not define before line 277 in 
> /usr/lib/ocf/resource.d/heartbeat/IPaddr2 :
> 
> I've add line SYSTYPE="`uname -s`" (copy from 
> /usr/lib/ocf/resource.d/heartbeat/IPaddr) and it's running correctly now.

That fix seems correct to me. And the problem seems fairly bad too.
Lars, Alan, any chance of this going into 2.0.7. I've added it
to my local queue to commit it afterwards if not.

Patch below

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


IPAddr2: Make sure SYSTYPE is defined as its used

This is a fix for a problem reported by Benoit Donneaux.
I have idea when it was introduced, but it seems kind of bad.

  http://permalink.gmane.org/gmane.linux.highavailability.devel/1242
  http://www.osdl.org/developer_bugzilla/show_bug.cgi?id=1397

Cc: Benoit Donneaux <[EMAIL PROTECTED]>
Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>
Index: linux-ha/resources/OCF/IPaddr2.in
===================================================================
--- linux-ha.orig/resources/OCF/IPaddr2.in      2006-08-09 19:37:38.000000000 
+0900
+++ linux-ha/resources/OCF/IPaddr2.in   2006-08-09 19:44:08.000000000 +0900
@@ -74,6 +74,8 @@
 
 #######################################################################
 
+SYSTYPE="`uname -s`"
+
 meta_data() {
        cat <<END
 <?xml version="1.0"?>


_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to