]> git.pld-linux.org Git - packages/glusterfs.git/commitdiff
- fixed stop, removed reload function (unsupported), added force-reload
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 12 Jan 2008 21:42:44 +0000 (21:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    glusterfsd.init -> 1.2

glusterfsd.init

index 3dc33689d069e911cd0e946bbc9c9d84e2ca0aae..789c3070a955a1910c9f4344227799298014adcb 100644 (file)
@@ -29,91 +29,65 @@ fi
 
 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
-
This page took 0.04298 seconds and 4 git commands to generate.