@@ -1,5 +1,5 @@
--- 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
++++ cman/init.d/cman.in 2008-12-31 11:03:40.000000000 +0100
@@ -16,7 +16,19 @@
# Description: Starts and stops the Cluster Manager set of daemons
### END INIT INFO
@@ -21,7 +21,7 @@
[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman
[ -z "$CCSD_OPTS" ] && CCSD_OPTS=
-@@ -82,10 +94,10 @@
+@@ -82,10 +94,15 @@
load_modules()
{
@@ -29,22 +29,31 @@
- 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
++ echo -n " configfs "
++ /sbin/modprobe configfs
++ rc_status -v
++ echo -n " dlm "
++ /sbin/modprobe dlm
++ rc_status -v
++ echo -n " lock_dlm "
++ /sbin/modprobe lock_dlm
++ rc_status -v
}
start_configfs()
-@@ -96,40 +108,34 @@
+@@ -95,41 +112,36 @@
+ && awk '{ print $3 }' /etc/mtab | grep "configfs" &> /dev/null
if [ $? -ne 0 ]
then
- errmsg=$( /bin/mount -t configfs none /sys/kernel/config 2>&1 )
+- errmsg=$( /bin/mount -t configfs none /sys/kernel/config 2>&1 )
- return $?
++ /bin/mount -t configfs none /sys/kernel/config
+ rc_status
++ else
++ rc_failed
fi
- return 0
-+ rc_status
++ rc_status -v
}
start_ccsd()
@@ -59,7 +68,7 @@
- fi
- return 0
+ startproc /usr/sbin/ccsd $CCSD_OPTS
-+ rc_status
++ rc_status -v
}
start_cman()
@@ -71,28 +80,32 @@
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
-
+-
++ /usr/sbin/cman_tool -t $CMAN_CLUSTER_TIMEOUT -w join $cman_join_opts
++ rc_status
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
++ /usr/sbin/cman_tool -t $CMAN_QUORUM_TIMEOUT -q wait
++ rc_status
fi
fi
- return 0
-+ rc_status
++ rc_status -v
}
-@@ -145,70 +151,63 @@
- /sbin/chkconfig --levels "$current_runlevel" qdiskd 2>/dev/null
+@@ -142,73 +154,74 @@
+ # Start qdiskd before fenced to resolve bug #436381. This only
+ # happens if qdiskd is configured to run in the runlevel we are in
+ #
+- /sbin/chkconfig --levels "$current_runlevel" qdiskd 2>/dev/null
++ /sbin/chkconfig -c qdiskd 2>/dev/null
if [ $? -ne 0 ]; then
# qdiskd doesn't start at this runlevel.
- return 0
-+ rc_status
++ return 1
fi
echo -n " Starting qdiskd... "
@@ -105,7 +118,7 @@
- return 1
- fi
- return 0
-+ rc_status
++ rc_status -v
}
@@ -115,25 +128,33 @@
+ 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
++ echo -n " groupd "
++ startproc /usr/sbin/groupd
++ rc_status -v
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
++ echo -n " fenced "
++ startproc /usr/sbin/fenced
++ rc_status -v
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
++ echo -n " dlm_controld "
++ startproc /usr/sbin/dlm_controld
++ rc_status -v
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
++ echo -n " gfs_controld "
++ startproc /usr/sbin/gfs_controld
++ rc_status -v
fi
- return 0
+ rc_status
@@ -147,14 +168,14 @@
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
++ /usr/sbin/fence_tool -w -t $FENCED_START_TIMEOUT join > /dev/null 2>&1
++ rc_status -v
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 \
+- -m $FENCED_MEMBER_DELAY join \
- > /dev/null 2>&1 ) || return 1
-+ > /dev/null 2>&1 ) || rc_failed
++ /usr/sbin/fence_tool -w -t $FENCED_START_TIMEOUT -m $FENCED_MEMBER_DELAY join > /dev/null 2>&1
++ rc_status -v
fi
- return 0
+ rc_status
@@ -166,7 +187,8 @@
+ 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
++ startproc /usr/sbin/fence_xvmd $FENCE_XVMD_OPTS
++ rc_status -v
fi
- return 0
+ rc_status
@@ -179,7 +201,16 @@
current_runlevel=$(/sbin/runlevel 2>/dev/null | awk '{ print $2 }' 2>/dev/null)
if [ -z "$current_runlevel" ]; then
-@@ -242,14 +241,14 @@
+@@ -216,7 +229,7 @@
+ return 1
+ fi
+
+- /sbin/chkconfig --levels "$current_runlevel" xend 2>/dev/null
++ /sbin/chkconfig -c xend 2>/dev/null
+ if [ $? -ne 0 ]; then
+ # xend doesn't start at this runlevel.
+ return 1
+@@ -242,14 +255,14 @@
else
errmsg='The xend bridged network script is missing'
|