[pve-devel] r6503 - redhat-cluster/trunk/debian/patches

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Aug 19 09:59:19 CEST 2011


Author: dietmar
Date: 2011-08-19 09:59:19 +0200 (Fri, 19 Aug 2011)
New Revision: 6503

Added:
   redhat-cluster/trunk/debian/patches/fix-rgmanager-init.diff
Modified:
   redhat-cluster/trunk/debian/patches/fix-lsb-header.diff
   redhat-cluster/trunk/debian/patches/series
Log:
fix rgmanager init


Modified: redhat-cluster/trunk/debian/patches/fix-lsb-header.diff
===================================================================
--- redhat-cluster/trunk/debian/patches/fix-lsb-header.diff	2011-08-19 07:39:51 UTC (rev 6502)
+++ redhat-cluster/trunk/debian/patches/fix-lsb-header.diff	2011-08-19 07:59:19 UTC (rev 6503)
@@ -38,63 +38,3 @@
  	[ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/cman"
  	netmanager=network-manager
  fi
-Index: new/rgmanager/init.d/rgmanager.in
-===================================================================
---- new.orig/rgmanager/init.d/rgmanager.in	2010-12-02 07:19:35.000000000 +0100
-+++ new/rgmanager/init.d/rgmanager.in	2010-12-02 07:35:14.000000000 +0100
-@@ -8,8 +8,8 @@
- # Provides:		rgmanager
- # Required-Start:	cman
- # Required-Stop:	cman
--# Default-Start:
--# Default-Stop:
-+# Default-Start:        S
-+# Default-Stop:         0 6
- # Short-Description:	Starts and stops Red Hat Service (resource group) Manager
- # Description:		Starts and stops Red Hat Service (resource group) Manager
- ### END INIT INFO
-@@ -20,6 +20,10 @@
- # set secure PATH
- PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBINDIR@"
- 
-+CCFG="/etc/cluster/cluster.conf"
-+
-+test -f "$CCFG" || exit 0
-+
- success()
- {
- 	echo -ne "[  OK  ]\r"
-@@ -52,8 +56,7 @@
- 
- # deb based distros
- if [ -d /etc/default ]; then
--	[ -f /etc/default/cluster ] && . /etc/default/cluster
--	[ -f /etc/default/rgmanager ] && . /etc/default/rgmanager
-+	[ -f /etc/default/redhat-cluster-pve ] && . /etc/default/redhat-cluster-pve
- 	[ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/rgmanager"
- fi
- 
-@@ -72,6 +75,11 @@
- 	done
- }
- 
-+rgmanager_enabled()
-+{
-+	ccs_tool query /cluster/rm >/dev/null 2>&1
-+}
-+
- rtrn=0
- 
- if [ "$EUID" != "0" ]; then
-@@ -81,6 +89,11 @@
- 
- case "$1" in
- start)
-+
-+	if ! rgmanager_enabled; then
-+	    exit 0;
-+	fi
-+
- 	echo -n "Starting $ID: "
- 
- 	# most recent distributions use tmpfs for /var/run

Added: redhat-cluster/trunk/debian/patches/fix-rgmanager-init.diff
===================================================================
--- redhat-cluster/trunk/debian/patches/fix-rgmanager-init.diff	                        (rev 0)
+++ redhat-cluster/trunk/debian/patches/fix-rgmanager-init.diff	2011-08-19 07:59:19 UTC (rev 6503)
@@ -0,0 +1,71 @@
+Index: new/rgmanager/init.d/rgmanager.in
+===================================================================
+--- new.orig/rgmanager/init.d/rgmanager.in	2011-07-19 12:52:29.000000000 +0200
++++ new/rgmanager/init.d/rgmanager.in	2011-08-19 09:58:14.000000000 +0200
+@@ -8,8 +8,8 @@
+ # Provides:		rgmanager
+ # Required-Start:	cman
+ # Required-Stop:	cman
+-# Default-Start:
+-# Default-Stop:
++# Default-Start:        S
++# Default-Stop:         0 6
+ # Short-Description:	Starts and stops Red Hat Service (resource group) Manager
+ # Description:		Starts and stops Red Hat Service (resource group) Manager
+ ### END INIT INFO
+@@ -20,6 +20,10 @@
+ # set secure PATH
+ PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBINDIR@"
+ 
++CCFG="/etc/cluster/cluster.conf"
++
++test -f "$CCFG" || exit 0
++
+ success()
+ {
+ 	echo -ne "[  OK  ]\r"
+@@ -52,8 +56,7 @@
+ 
+ # deb based distros
+ if [ -d /etc/default ]; then
+-	[ -f /etc/default/cluster ] && . /etc/default/cluster
+-	[ -f /etc/default/rgmanager ] && . /etc/default/rgmanager
++	[ -f /etc/default/redhat-cluster-pve ] && . /etc/default/redhat-cluster-pve
+ 	[ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/rgmanager"
+ fi
+ 
+@@ -72,6 +75,11 @@
+ 	done
+ }
+ 
++rgmanager_enabled()
++{
++	ccs_tool query /cluster/rm >/dev/null 2>&1
++}
++
+ rtrn=0
+ 
+ if [ "$EUID" != "0" ]; then
+@@ -81,6 +89,11 @@
+ 
+ case "$1" in
+ start)
++
++	if ! rgmanager_enabled; then
++	    exit 0;
++	fi
++
+ 	echo -n "Starting $ID: "
+ 
+ 	# most recent distributions use tmpfs for /var/run
+@@ -92,7 +105,9 @@
+ 	if status $RGMGRD > /dev/null 2>&1; then
+ 		success
+ 	else
+-		if $RGMGRD $RGMGR_OPTS; then
++	        # do not trust return code
++		$RGMGRD $RGMGR_OPTS;
++		if status $RGMGRD > /dev/null 2>&1; then
+ 			touch $LOCK_FILE
+ 			success
+ 		else

Modified: redhat-cluster/trunk/debian/patches/series
===================================================================
--- redhat-cluster/trunk/debian/patches/series	2011-08-19 07:39:51 UTC (rev 6502)
+++ redhat-cluster/trunk/debian/patches/series	2011-08-19 07:59:19 UTC (rev 6503)
@@ -4,4 +4,5 @@
 #enable-gfs.diff
 fix-cman-init.diff
 fix-lsb-header.diff
+fix-rgmanager-init.diff
 fix-startup-config-timeout.diff




More information about the pve-devel mailing list