Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
cluster2
> cluster-rgmanager-init.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File cluster-rgmanager-init.patch of Package cluster2 (Revision 26)
Currently displaying revision
26
,
show latest
--- rgmanager/init.d/rgmanager.in.orig 2008-12-30 21:56:29.000000000 +0100 +++ rgmanager/init.d/rgmanager.in 2009-03-30 10:06:25.000000000 +0200 @@ -5,19 +5,28 @@ ### BEGIN INIT INFO # Provides: rgmanager -# Required-Start: cman -# Required-Stop: cman -# Default-Start: +# Required-Start: $network cman +# Required-Stop: cman +# Default-Start: 2 3 5 # Default-Stop: # Short-Description: Starts and stops Red Hat Service (resource group) Manager # Description: Starts and stops Red Hat Service (resource group) Manager ### 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