Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: resources by lars from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: resources by lars from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: resources by lars from 
      (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: ldirectord by msoffen from 
      (linux-ha-cvs@lists.linux-ha.org)


----------------------------------------------------------------------

Message: 1
Date: Wed,  9 Aug 2006 06:58:15 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        IPaddr2.in 


Log Message:
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

Signed-Off-By: [EMAIL PROTECTED]
Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPaddr2.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- IPaddr2.in  21 Jul 2006 08:19:54 -0000      1.22
+++ IPaddr2.in  9 Aug 2006 12:58:14 -0000       1.23
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: IPaddr2.in,v 1.22 2006/07/21 08:19:54 panjiam Exp $
+#      $Id: IPaddr2.in,v 1.23 2006/08/09 12:58:14 lars Exp $
 #
 #       OCF Resource Agent compliant IPaddr2 script.
 #
@@ -74,6 +74,8 @@
 
 #######################################################################
 
+SYSTYPE="`uname -s`"
+
 meta_data() {
        cat <<END
 <?xml version="1.0"?>




------------------------------

Message: 2
Date: Wed,  9 Aug 2006 07:00:19 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        IPsrcaddr.in 


Log Message:
Resource Scripts: Set SYSTYPE early in IPsrcaddr

SYSTYPE is actually used in a few places, but is set inside of ip_status().
I couldn't convince myself that it broke anything, but there is clearly
scope if ip_status() isn't called early enough now or in the future.

This patch sets SYSTYPE right near the top of the script.

Signed-off-by: [EMAIL PROTECTED]
Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPsrcaddr.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- IPsrcaddr.in        10 Mar 2006 04:14:20 -0000      1.6
+++ IPsrcaddr.in        9 Aug 2006 13:00:19 -0000       1.7
@@ -64,6 +64,8 @@
   CMDSHOW="$IPROUTE route show   to exact 0/0"
 CMDCHANGE="$IPROUTE route change to "
 
+SYSTYPE="`uname -s`"
+
 usage() {
        echo $USAGE >&2
 }
@@ -339,7 +341,6 @@
 ip_status() {
 
   BASEIP="$1"
-  SYSTYPE="`uname -s`"
   case "$SYSTYPE" in
     Darwin)
        # Treat Darwin the same as the other BSD variants (matched as *BSD)




------------------------------

Message: 3
Date: Wed,  9 Aug 2006 07:01:54 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        IPaddr.in IPaddr2.in IPsrcaddr.in 


Log Message:
Resource Scripts: Make sure that SYSTYPE is quoted

This is probably a bit paranoid, but $SYSTYPE really ought to be quoted
when used in if-then-else clauses. I'm not sure about case, but
there was one quoted instance, so I made them all quoted. I can make
the reverse change if that is prefered.

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>
Signed-Off-By: [EMAIL PROTECTED]


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPaddr.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- IPaddr.in   18 Jul 2006 17:06:28 -0000      1.47
+++ IPaddr.in   9 Aug 2006 13:01:54 -0000       1.48
@@ -270,7 +270,7 @@
        esac
 
        LVS_SUPPORT=0
-       if [ $SYSTYPE = "Linux" -o $SYSTYPE = "SunOS" ]; then
+       if [ "$SYSTYPE" = "Linux" -o "$SYSTYPE" = "SunOS" ]; then
            if [ x"${OCF_RESKEY_lvs_support}" = x"true" \
                -o x"${OCF_RESKEY_lvs_support}" = x"on" \
                -o x"${OCF_RESKEY_lvs_support}" = x"1" ]; then
@@ -368,7 +368,7 @@
     esac
 
 
-    case $SYSTYPE in
+    case "$SYSTYPE" in
       *BSD)
                $IFCONFIG | grep "$ipaddr" -B20 | grep "UP," | tail -n 1 | cut 
-d ":" -f 1
                return 0;;
@@ -393,7 +393,7 @@
 #
 find_interface() {
     ipaddr="$1"
-    case $SYSTYPE in
+    case "$SYSTYPE" in
        SunOS)
                NIC=`find_interface_solaris $ipaddr`
         ;;
@@ -419,7 +419,7 @@
        return $OCF_ERR_GENERIC;
     fi
 
-  case $SYSTYPE in
+  case "$SYSTYPE" in
        *BSD)
                echo $NIC;
                return $OCF_SUCCESS;;
@@ -438,7 +438,7 @@
   NICBASE="$VLDIR/$NIC"
   touch "$NICBASE"
 
-  case $SYSTYPE in
+  case "$SYSTYPE" in
        SunOS)
                j=1
                ;;
@@ -485,7 +485,7 @@
 delete_route () {
   ipaddr="$1"
 
-  case $SYSTYPE in
+  case "$SYSTYPE" in
        SunOS)
                CMD=""
                ;;
@@ -508,7 +508,7 @@
   ifname="$1"
   ipaddr="$2"
 
-  case $SYSTYPE in
+  case "$SYSTYPE" in
        SunOS)
                if [ "$SYSVERSION" -ge 8 ] ; then
                    CMD="$IFCONFIG $ifname unplumb"
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPaddr2.in,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- IPaddr2.in  9 Aug 2006 12:58:14 -0000       1.23
+++ IPaddr2.in  9 Aug 2006 13:01:54 -0000       1.24
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: IPaddr2.in,v 1.23 2006/08/09 12:58:14 lars Exp $
+#      $Id: IPaddr2.in,v 1.24 2006/08/09 13:01:54 lars Exp $
 #
 #       OCF Resource Agent compliant IPaddr2 script.
 #
@@ -276,7 +276,7 @@
        IF_MAC="$OCF_RESKEY_mac"
 
        LVS_SUPPORT=0
-       if [ $SYSTYPE = "Linux" -o $SYSTYPE = "SunOS" ]; then
+       if [ "$SYSTYPE" = "Linux" -o "$SYSTYPE" = "SunOS" ]; then
            if [ x"${OCF_RESKEY_lvs_support}" = x"true" \
                -o x"${OCF_RESKEY_lvs_support}" = x"on" \
                -o x"${OCF_RESKEY_lvs_support}" = x"1" ]; then
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPsrcaddr.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- IPsrcaddr.in        9 Aug 2006 13:00:19 -0000       1.7
+++ IPsrcaddr.in        9 Aug 2006 13:01:54 -0000       1.8
@@ -300,7 +300,7 @@
       : Nothing
     done
 
-    case $SYSTYPE in
+    case "$SYSTYPE" in
       *BSD)
                $IFCONFIG | grep "$BASEIP" -B4 | grep "UP," | cut -d ":" -f 1
                return 0;;
@@ -324,7 +324,7 @@
 #       is an (aliased) interface name (e.g., "eth0" and "eth0:0").
 #
 find_interface() {
-    case $SYSTYPE in
+    case "$SYSTYPE" in
        SunOS)
                IF=`find_interface_solaris $BASEIP`
         ;;
@@ -351,7 +351,7 @@
   esac
 
 
-  case $SYSTYPE in
+  case "$SYSTYPE" in
       *BSD)
          $IFCONFIG $IFCONFIG_A_OPT | grep "inet.*[: ]$BASEIP " >/dev/null 2>&1
          if [ $? = 0 ]; then




------------------------------

Message: 4
Date: Wed,  9 Aug 2006 07:52:02 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by msoffen from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : msoffen
Host    : 
Project : linux-ha
Module  : ldirectord

Dir     : linux-ha/ldirectord/init.d


Modified Files:
        .cvsignore 


Log Message:
Added ldirectord.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/init.d/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- .cvsignore  28 Sep 2004 14:37:05 -0000      1.2
+++ .cvsignore  9 Aug 2006 13:52:01 -0000       1.3
@@ -3,3 +3,4 @@
 *.beam
 parser-messages
 MISC_ERRORS
+ldirectord




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 33, Issue 9
*******************************************

Reply via email to