[-]
[+]
|
Changed |
cluster.spec
|
|
[-]
[+]
|
Added |
cluster-cman-init.patch
^
|
@@ -0,0 +1,527 @@
+--- cman/init.d/cman.in.orig 2008-12-30 22:03:01.000000000 +0100
++++ cman/init.d/cman.in 2008-12-30 22:31:19.000000000 +0100
+@@ -16,7 +16,19 @@
+ # Description: Starts and stops the Cluster Manager set of daemons
+ ### END INIT INFO
+
+-. /etc/init.d/functions
++. /etc/rc.status
++
++# Shell functions sourced from /etc/rc.status:
++# rc_check check and set local and overall rc status
++# rc_status check and set local and overall rc status
++# rc_status -v ditto but be verbose in local rc status
++# rc_status -v -r ditto and clear the local rc status
++# rc_failed set local and overall rc status to failed
++# rc_reset clear local rc status (overall remains)
++# rc_exit exit appropriate to overall rc status
++
++# First reset status of this service
++rc_reset
+
+ [ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman
+ [ -z "$CCSD_OPTS" ] && CCSD_OPTS=
+@@ -82,10 +94,10 @@
+
+ load_modules()
+ {
+- errmsg=$( /sbin/modprobe configfs 2>&1 ) || return 1
+- errmsg=$( /sbin/modprobe dlm 2>&1 ) || return 1
+- errmsg=$( /sbin/modprobe lock_dlm 2>&1 ) || return 1
+- return 0
++ errmsg=$( /sbin/modprobe configfs 2>&1 ) || rc_failed
++ errmsg=$( /sbin/modprobe dlm 2>&1 ) || rc_failed
++ errmsg=$( /sbin/modprobe lock_dlm 2>&1 ) || rc_failed
++ rc_status
+ }
+
+ start_configfs()
+@@ -96,40 +108,34 @@
+ if [ $? -ne 0 ]
+ then
+ errmsg=$( /bin/mount -t configfs none /sys/kernel/config 2>&1 )
+- return $?
++ rc_status
+ fi
+- return 0
++ rc_status
+ }
+
+ start_ccsd()
+ {
+ # ccsd
+- status ccsd &> /dev/null
+- if [ $? -ne 0 ]
+- then
+- errmsg=$(/sbin/ccsd $CCSD_OPTS 2>&1)
+- rtrn=$?
+- return $rtrn
+- fi
+- return 0
++ startproc /usr/sbin/ccsd $CCSD_OPTS
++ rc_status
+ }
+
+ start_cman()
+ {
+ # cman
+- /sbin/cman_tool status &> /dev/null
++ /usr/sbin/cman_tool status &> /dev/null
+ if [ $? -ne 0 ]
+ then
+- errmsg=$( /sbin/cman_tool -t $CMAN_CLUSTER_TIMEOUT -w join \
+- $cman_join_opts 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/cman_tool -t $CMAN_CLUSTER_TIMEOUT -w join \
++ $cman_join_opts 2>&1 ) || rc_failed
+
+ if [ $CMAN_QUORUM_TIMEOUT -gt 0 ]
+ then
+- errmsg=$( /sbin/cman_tool -t $CMAN_QUORUM_TIMEOUT \
+- -q wait 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/cman_tool -t $CMAN_QUORUM_TIMEOUT \
++ -q wait 2>&1 ) || rc_failed
+ fi
+ fi
+- return 0
++ rc_status
+ }
+
+
+@@ -145,70 +151,63 @@
+ /sbin/chkconfig --levels "$current_runlevel" qdiskd 2>/dev/null
+ if [ $? -ne 0 ]; then
+ # qdiskd doesn't start at this runlevel.
+- return 0
++ rc_status
+ fi
+
+ echo -n " Starting qdiskd... "
+ /sbin/service qdiskd start &> /dev/null
+- if [ $? -eq 0 ]
+- then
+- echo "done"
+- else
+- echo "failed"
+- return 1
+- fi
+- return 0
++ rc_status
+ }
+
+
+ start_daemons()
+ {
+- status groupd &> /dev/null
++ checkproc /usr/sbin/groupd &> /dev/null
+ if [ $? -ne 0 ]; then
+- errmsg=$( /sbin/groupd 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/groupd 2>&1 ) || rc_failed
+ fi
+- status fenced &> /dev/null
++ checkproc /usr/sbin/fenced &> /dev/null
+ if [ $? -ne 0 ]; then
+- errmsg=$( /sbin/fenced 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/fenced 2>&1 ) || rc_failed
+ fi
+- status dlm_controld &> /dev/null
++ checkproc /usr/sbin/dlm_controld &> /dev/null
+ if [ $? -ne 0 ]; then
+- errmsg=$( /sbin/dlm_controld 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/dlm_controld 2>&1 ) || rc_failed
+ fi
+- status gfs_controld &> /dev/null
++ checkproc /usr/sbin/gfs_controld &> /dev/null
+ if [ $? -ne 0 ]; then
+- errmsg=$( /sbin/gfs_controld 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/gfs_controld 2>&1 ) || rc_failed
+ fi
+- return 0
++ rc_status
+ }
+
+ start_fence()
+ {
+- /sbin/cman_tool status | grep Flags | grep 2node &> /dev/null
++ /usr/sbin/cman_tool status | grep Flags | grep 2node &> /dev/null
+ if [ $? -ne 0 ]
+ then
+- errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT join \
+- > /dev/null 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/fence_tool -w -t $FENCED_START_TIMEOUT join \
++ > /dev/null 2>&1 ) || rc_failed
+ else
+- errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT \
++ errmsg=$( /usr/sbin/fence_tool -w -t $FENCED_START_TIMEOUT \
+ -m $FENCED_MEMBER_DELAY join \
+- > /dev/null 2>&1 ) || return 1
++ > /dev/null 2>&1 ) || rc_failed
+ fi
+- return 0
++ rc_status
+ }
+
+ start_fence_xvmd()
+ {
+- status fence_xvmd &> /dev/null
++ checkproc /usr/sbin/fence_xvmd &> /dev/null
+ if [ $? -ne 0 ]; then
+- errmsg=$( /sbin/fence_xvmd $FENCE_XVMD_OPTS 2>&1 ) || return 1
++ errmsg=$( /usr/sbin/fence_xvmd $FENCE_XVMD_OPTS 2>&1 ) || rc_failed
+ fi
+- return 0
++ rc_status
+ }
+
+ xend_bridged_net_enabled() {
+ # Not a xen kernel
+- test -d /proc/xen || return 1
++ test -d /proc/xen || rc_failed
+
+ current_runlevel=$(/sbin/runlevel 2>/dev/null | awk '{ print $2 }' 2>/dev/null)
+ if [ -z "$current_runlevel" ]; then
+@@ -242,14 +241,14 @@
+ else
+ errmsg='The xend bridged network script is missing'
+ fi
+- return 1
++ rc_failed
+ fi
+
+ /sbin/modprobe netbk >& /dev/null
+ /sbin/modprobe netloop >& /dev/null
+ bridge_parms=`egrep -m 1 "^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+(')?[[:blank:]]*${NETWORK_BRIDGE_SCRIPT}([[:blank:]]*\)|[[:blank:]]+)" /etc/xen/xend-config.sxp| sed -r "s/^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+'?[[:blank:]]*${NETWORK_BRIDGE_SCRIPT}[[:blank:]]*//; s/'?[[:blank:]]*\).*//"`
+- errmsg=$(/etc/xen/scripts/${NETWORK_BRIDGE_SCRIPT} start $bridge_parms 2>&1) || return 1
+- return 0
++ errmsg=$(/etc/xen/scripts/${NETWORK_BRIDGE_SCRIPT} start $bridge_parms 2>&1) || rc_failed
++ rc_status
+ }
+
+ fence_xvmd_enabled()
|
[-]
[+]
|
Added |
cluster-gfs-init.patch
^
|
@@ -0,0 +1,56 @@
+--- gfs/init.d/gfs.orig 2008-12-30 21:50:56.000000000 +0100
++++ gfs/init.d/gfs 2008-12-30 21:53:05.000000000 +0100
+@@ -15,7 +15,20 @@
+ # Description: mount/unmount gfs filesystems configured in /etc/fstab
+ ### END INIT INFO
+
+-. /etc/init.d/functions
++. /etc/rc.status
++
++# Shell functions sourced from /etc/rc.status:
++# rc_check check and set local and overall rc status
++# rc_status check and set local and overall rc status
++# rc_status -v ditto but be verbose in local rc status
++# rc_status -v -r ditto and clear the local rc status
++# rc_failed set local and overall rc status to failed
++# rc_reset clear local rc status (overall remains)
++# rc_exit exit appropriate to overall rc status
++
++# First reset status of this service
++rc_reset
++
+ [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+
+ #
+@@ -30,6 +43,7 @@
+ if [ -n "$GFSFSTAB" ]
+ then
+ action $"Mounting GFS filesystems: " mount -a -t gfs
++ rc_status
+ fi
+ touch /var/lock/subsys/gfs
+ ;;
+@@ -61,6 +75,7 @@
+ fi
+
+ modprobe -r gfs
++ rc_status
+ rm -f /var/lock/subsys/gfs
+ ;;
+
+@@ -77,7 +92,9 @@
+ }
+ else
+ echo "/proc filesystem unavailable"
++ rc_failed
+ fi
++ rc_status
+ ;;
+
+ restart)
+@@ -93,4 +110,4 @@
+ exit 1
+ esac
+
+-exit 0
++rc_exit
|
[-]
[+]
|
Added |
cluster-gfs2-init.patch
^
|
@@ -0,0 +1,57 @@
+--- gfs2/init.d/gfs2.orig 2008-12-30 21:53:45.000000000 +0100
++++ gfs2/init.d/gfs2 2008-12-30 21:55:17.000000000 +0100
+@@ -15,7 +15,20 @@
+ # Description: mount/unmount gfs2 filesystems configured in /etc/fstab
+ ### END INIT INFO
+
+-. /etc/init.d/functions
++. /etc/rc.status
++
++# Shell functions sourced from /etc/rc.status:
++# rc_check check and set local and overall rc status
++# rc_status check and set local and overall rc status
++# rc_status -v ditto but be verbose in local rc status
++# rc_status -v -r ditto and clear the local rc status
++# rc_failed set local and overall rc status to failed
++# rc_reset clear local rc status (overall remains)
++# rc_exit exit appropriate to overall rc status
++
++# First reset status of this service
++rc_reset
++
+ [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+
+ #
+@@ -30,6 +43,7 @@
+ if [ -n "$GFS2FSTAB" ]
+ then
+ action $"Mounting GFS2 filesystems: " mount -a -t gfs2
++ rc_status
+ fi
+ touch /var/lock/subsys/gfs2
+ ;;
+@@ -59,7 +73,7 @@
+ sig=-9
+ done
+ fi
+-
++ rc_status
+ rm -f /var/lock/subsys/gfs2
+ ;;
+
+@@ -76,7 +90,9 @@
+ }
+ else
+ echo "/proc filesystem unavailable"
++ rc_failed
+ fi
++ rc_status
+ ;;
+
+ restart)
+@@ -92,4 +108,4 @@
+ exit 1
+ esac
+
+-exit 0
++rc_exit
|
[-]
[+]
|
Added |
cluster-qdiskd-init.patch
^
|
@@ -0,0 +1,100 @@
+--- cman/init.d/qdiskd.orig 2008-12-30 22:03:05.000000000 +0100
++++ cman/init.d/qdiskd 2008-12-30 22:06:29.000000000 +0100
+@@ -15,12 +15,24 @@
+ # Description: start/stop quorum disk daemon
+ ### END INIT INFO
+
+-. /etc/init.d/functions
++. /etc/rc.status
++
++# Shell functions sourced from /etc/rc.status:
++# rc_check check and set local and overall rc status
++# rc_status check and set local and overall rc status
++# rc_status -v ditto but be verbose in local rc status
++# rc_status -v -r ditto and clear the local rc status
++# rc_failed set local and overall rc status to failed
++# rc_reset clear local rc status (overall remains)
++# rc_exit exit appropriate to overall rc status
++
++# First reset status of this service
++rc_reset
++
+ [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+
+ LOCK_FILE="/var/lock/subsys/qdiskd"
+-
+-rtrn=1
++QDISKD="/usr/sbin/qdiskd"
+ retries=0
+
+ # See how we were called.
+@@ -28,55 +40,34 @@
+ start)
+ echo -n "Starting the Quorum Disk Daemon:"
+
+- $0 status >/dev/null
+- if [ $? -eq 0 ]; then
+- echo_success
+- echo
+- exit 0
+- fi
+-
+- qdiskd -Q
+- rtrn=$?
+- if [ $rtrn = 0 ]; then
+- touch $LOCK_FILE
+- echo_success
+- echo
+- else
+- echo_failure
+- echo
+- fi
+-
++ startproc $QDISKD
++ rc_status
+ ;;
+
+ stop)
+ echo -n "Stopping the Quorum Disk Daemon:"
+- killproc qdiskd
++ killproc $QDISKD
+ while [ -n "`pidof qdiskd`" ] && [ $retries -lt 5 ]; do
+ sleep 1
+- killproc qdiskd
++ killproc $QDISKD
+ ((retries++))
+ done
+ if [ -z "`pidof qdiskd`" ]; then
+- echo_success
+- echo
+- rtrn=0
++ rc_status
+ rm -f $LOCK_FILE
+ else
+- echo_failure
+- echo
+- rtrn=1
++ rc_failed
+ fi
+ ;;
+
+ restart|reload)
+ $0 stop || exit $?
+ $0 start
+- rtrn=$?
+ ;;
+
+ status)
+- status qdiskd
+- rtrn=$?
++ checkproc $QDISKD
++ rc_status
+ ;;
+
+ *)
+@@ -84,4 +75,4 @@
+ ;;
+ esac
+
+-exit $rtrn
++rc_exit
|
[-]
[+]
|
Added |
cluster-rgmanager-init.patch
^
|
@@ -0,0 +1,96 @@
+--- rgmanager/init.d/rgmanager.in.orig 2008-12-30 21:56:29.000000000 +0100
++++ rgmanager/init.d/rgmanager.in 2008-12-30 22:06:58.000000000 +0100
+@@ -5,8 +5,8 @@
+
+ ### BEGIN INIT INFO
+ # Provides: rgmanager
+-# Required-Start: cman
+-# Required-Stop: cman
++# Required-Start: $network cman
++# Required-Stop: $network cman
+ # Default-Start:
+ # Default-Stop:
+ # Short-Description: Starts and stops Red Hat Service (resource group) Manager
+@@ -14,10 +14,19 @@
+ ### END INIT INFO
+
+ # Source function library
+-. /etc/init.d/functions
++. /etc/rc.status
+
+-# Grab the network config file
+-. /etc/sysconfig/network
++# Shell functions sourced from /etc/rc.status:
++# rc_check check and set local and overall rc status
++# rc_status check and set local and overall rc status
++# rc_status -v ditto but be verbose in local rc status
++# rc_status -v -r ditto and clear the local rc status
++# rc_failed set local and overall rc status to failed
++# rc_reset clear local rc status (overall remains)
++# rc_exit exit appropriate to overall rc status
++
++# First reset status of this service
++rc_reset
+
+ # Grab cluster start config if it exists
+ [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+@@ -66,15 +75,11 @@
+ while [ -n "`pidof $RGMGRD`" ]; do
+ sleep 1
+ done
+- echo_success
+- echo
++ rc_status
+ else
+ echo $"Services are stopped."
+ fi
+
+- # Ensure all NFS rmtab daemons are dead.
+- killall $RMTABD &> /dev/null
+-
+ rm -f /var/run/$RGMGRD.pid
+
+ return 0
+@@ -94,15 +99,13 @@
+ [ -f "$CFG_FILE" ] || exit 0
+
+ echo -n $"Starting $ID: "
+- daemon $RGMGRD $RGMGR_OPTS
+- ret=$?
+- echo
++ startproc $RGMGRD $RGMGR_OPTS
++ rc_status
+
+ # To be consistent...
+ if [ $ret -eq 0 ]; then
+ touch /var/lock/subsys/rgmanager
+ fi
+- exit $ret
+ ;;
+
+ restart)
+@@ -125,15 +128,12 @@
+ clulog -p $LOG_NOTICE "Reloading Resource Configuration."
+ echo -n $"Reloading Resource Configuration: "
+ killproc $RGMGRD -HUP
+- rv=$?
+- echo
+-
+- exit $rv
++ rc_status
+ ;;
+
+ status)
+- status $RGMGRD
+- exit $?
++ checkproc $RGMGRD
++ rc_status
+ ;;
+
+ stop)
+@@ -151,4 +151,4 @@
+ ;;
+ esac
+
+-exit 0
++rc_exit
|