Author: qboosh                       Date: Sat Jan 12 21:42:50 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixed stop, removed reload function (unsupported), added force-reload

---- Files affected:
SOURCES:
   glusterfsd.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/glusterfsd.init
diff -u SOURCES/glusterfsd.init:1.1 SOURCES/glusterfsd.init:1.2
--- SOURCES/glusterfsd.init:1.1 Fri Jan  4 16:40:12 2008
+++ SOURCES/glusterfsd.init     Sat Jan 12 22:42:44 2008
@@ -29,91 +29,65 @@
 
 test -x /usr/sbin/glusterfsd || exit 0
 
-
-
-
 start() {
-        # Check if the service is already running?
-        if [ ! -f /var/lock/subsys/glusterfsd ]; then
-                msg_starting glusterfsd
-                daemon /usr/sbin/glusterfsd --pidfile=/var/run/glusterfsd.pid #
-                RETVAL=$?
-                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/glusterfsd
-        else
-                msg_already_running glusterfsd
-        fi
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/glusterfsd ]; then
+               msg_starting glusterfsd
+               daemon /usr/sbin/glusterfsd --pidfile=/var/run/glusterfsd.pid #
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/glusterfsd
+       else
+               msg_already_running glusterfsd
+       fi
 }
 
 stop() {
-        if [ -f /var/lock/subsys/glusterfsd ]; then
-                # Stop daemons.
-                msg_stopping glusterfsd
-                killproc glusterfsd
-                killproc --pidfile /var/run/glusterfsd.pid glusterfsd -TERM
-                rm -f /var/lock/subsys/glusterfsd
-        else
-                msg_not_running glusterfsd
-        fi
-}
-
-reload() {
-        if [ -f /var/lock/subsys/glusterfsd ]; then
-                msg_reloading glusterfsd
-                killproc glusterfsd -HUP
-                killproc --pidfile /var/run/glusterfsd.pid glusterfsd -HUP
-                RETVAL=$?
-        else
-                msg_not_running glusterfsd
-                RETVAL=7
-        fi
+       if [ -f /var/lock/subsys/glusterfsd ]; then
+               # Stop daemons.
+               msg_stopping glusterfsd
+               killproc --pidfile /var/run/glusterfsd.pid glusterfsd -TERM
+               rm -f /var/lock/subsys/glusterfsd
+       else
+               msg_not_running glusterfsd
+       fi
 }
 
 condrestart() {
-        if [ -f /var/lock/subsys/glusterfsd ]; then
-                stop
-                start
-        else
-                msg_not_running glusterfsd
-                RETVAL=$1
-        fi
+       if [ -f /var/lock/subsys/glusterfsd ]; then
+               stop
+               start
+       else
+               msg_not_running glusterfsd
+               RETVAL=$1
+       fi
 }
 
-
-
 RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-        start
-        ;;
+       start
+       ;;
   stop)
-        stop
-        ;;
+       stop
+       ;;
   restart)
-        stop
-        start
-        ;;
+       stop
+       start
+       ;;
   try-restart)
-        condrestart 0
-        ;;
-# include force-reload here if program allows reloading without restart
-# otherwise remove reload action and support force-reload as restart if running
-#  reload|force-reload)
-#        reload
-#        ;;
-# use this one if program doesn't support reloading without restart
-#  force-reload)
-#        condrestart 7
-#        ;;
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
-        status glusterfsd
-        RETVAL=$?
-        ;;
+       status glusterfsd
+       RETVAL=$?
+       ;;
   *)
-        ## msg_usage "$0 
{start|stop|restart|try-restart|reload|force-reload|status}"
-       msg_usage "$0 {start|stop|restart|try-restart|status}"
-        exit 3
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
-
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/glusterfsd.init?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to