[Ocfs2-tools-commits] jlbec commits r1387 - branches/cman-based/vendor/common

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Aug 15 17:33:12 PDT 2007


Author: jlbec
Date: 2007-08-15 17:33:11 -0700 (Wed, 15 Aug 2007)
New Revision: 1387

Modified:
   branches/cman-based/vendor/common/o2cb.init.sh
Log:

Store the currently running cluster stack in /var/run/o2cb.stack



Modified: branches/cman-based/vendor/common/o2cb.init.sh
===================================================================
--- branches/cman-based/vendor/common/o2cb.init.sh	2007-08-15 23:07:13 UTC (rev 1386)
+++ branches/cman-based/vendor/common/o2cb.init.sh	2007-08-16 00:33:11 UTC (rev 1387)
@@ -26,6 +26,7 @@
 fi
 
 CLUSTERCONF=/etc/ocfs2/cluster.conf
+STACKCONF=/var/run/o2cb.stack
 
 if [ -f /etc/sysconfig/o2cb ]
 then
@@ -1181,6 +1182,12 @@
             ;;
     esac
 
+    echo "$O2CB_STACK" >"$STACKCONF" 2>/dev/null
+    if [ "$?" != 0 ]
+    then
+        echo -n "Setting O2CB_STACK file: "
+        if_fail $? "Unable to store cluster stack information"
+    fi
 }
 
 #
@@ -1270,9 +1277,12 @@
         if_fail 1 "Cman cluster is \"$CMAN_CLUSTER\", not \"$CLUSTER\""
     fi
 
-    echo -n "Stopping O2CB cluster ${CLUSTER}: "
     check_heartbeat $CLUSTER
-    [ $? != 0 ] && if_fail 1 "Unable to stop cluster as heartbeat region still active"
+    if [ $? != 0 ]
+    then
+        echo -n "Stopping O2CB cluster ${CLUSTER}: "
+        if_fail 1 "Unable to stop cluster as heartbeat region still active"
+    fi
  
     echo -n "Stopping ocfs2_controld: "
     killproc /sbin/ocfs2_controld
@@ -1320,6 +1330,8 @@
             ;;
     esac
 
+    rm -f "$STACKCONF" 2>/dev/null
+
     unload_module ocfs2
     if_fail "$?"
 }




More information about the Ocfs2-tools-commits mailing list