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 13)
Currently displaying revision
13
,
show latest
--- 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