summaryrefslogtreecommitdiffstats
path: root/extras/init.d
diff options
context:
space:
mode:
authorSachidananda Urs <sac@gluster.com>2011-11-23 00:02:33 +0530
committerAnand Avati <avati@gluster.com>2011-11-23 20:50:47 -0800
commit5aed416a5f61b18a7eb105fde0752d1f66c37a88 (patch)
tree5c1f29ca3cbbf5843482d625a161564f830850ae /extras/init.d
parent9ac21b5a3e1b0d4afba1afb04ec62ce75e302a5e (diff)
Change the start/stop order of glusterd script at boot time.
In cases of client and server sharing the same machine, mounting GlusterFS at boot time failed due to the start and stop order we use for glusterd. And people had to resort to the idea of adding mount command in rc.local. Currently the start and stop order at the boot time were 90 and 12, and netfs started before `glusterd' and failed to mount GlusterFS. By changing the rc order to 20 80 glusterd is started earlier than netfs, thus enabling netfs to mount GlusterFS during boot process. Thanks to: alex@net13.info for the suggestion in bug 2484. Change-Id: I482f4dac5e5dd8bc5b8f5034c394f5dbe6c1fd3e BUG: 2484 Reviewed-on: http://review.gluster.com/746 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <fharshav@redhat.com> Tested-by: Harshavardhana <fharshav@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'extras/init.d')
-rwxr-xr-xextras/init.d/glusterd-Redhat.in70
1 files changed, 35 insertions, 35 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in
index 6e1260e5cda..01a3009470e 100755
--- a/extras/init.d/glusterd-Redhat.in
+++ b/extras/init.d/glusterd-Redhat.in
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# chkconfig: 35 90 12
+# chkconfig: 35 20 80
# description: Gluster File System service for volume management
#
@@ -18,54 +18,54 @@ RETVAL=0
# Start the service $BASE
start()
{
- echo -n $"Starting $BASE:"
- daemon $GLUSTERD
- RETVAL=$?
- echo
- [ $RETVAL -ne 0 ] && exit $RETVAL
+ echo -n $"Starting $BASE:"
+ daemon $GLUSTERD
+ RETVAL=$?
+ echo
+ [ $RETVAL -ne 0 ] && exit $RETVAL
}
# Stop the service $BASE
stop()
{
- echo -n $"Stopping $BASE:"
- killproc $BASE
- echo
- pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null
- [ $? -eq 0 ] && killproc $GLUSTERFSD &> /dev/null
+ echo -n $"Stopping $BASE:"
+ killproc $BASE
+ echo
+ pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null
+ [ $? -eq 0 ] && killproc $GLUSTERFSD &> /dev/null
#pidof -c -o %PPID -x $GLUSTERFS &> /dev/null
#[ $? -eq 0 ] && killproc $GLUSTERFS &> /dev/null
-
- if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then
- pid=`cat /etc/glusterd/nfs/run/nfs.pid`;
- cmd=`ps -p $pid -o comm=`
- if [ $cmd == "glusterfs" ]; then
- kill `cat /etc/glusterd/nfs/run/nfs.pid`
- fi
- fi
+ if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then
+ pid=`cat /etc/glusterd/nfs/run/nfs.pid`;
+ cmd=`ps -p $pid -o comm=`
+
+ if [ $cmd == "glusterfs" ]; then
+ kill `cat /etc/glusterd/nfs/run/nfs.pid`
+ fi
+ fi
}
### service arguments ###
case $1 in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $BASE
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart}."
- exit 1
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $BASE
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart}."
+ exit 1
esac
exit 0