]> git.pld-linux.org Git - packages/nfs-utils.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 13 Oct 2006 15:11:08 +0000 (15:11 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rquotad.init -> 1.11

rquotad.init

index 9424be49e96047e00897bde4b42b814225ecc3b8..db9df09f28c0e94e8550977b0ad736b54788cb27 100644 (file)
@@ -41,10 +41,7 @@ else
     RQUOTADOPTIONS="$RQUOTADOPTIONS --no-setquota"
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/rquotad ]; then
                # Start daemons.
@@ -55,8 +52,9 @@ case "$1" in
        else
                msg_already_running "NFS quota daemon"
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/rquotad ]; then
                # Stop daemons.
                msg_stopping "NFS quotas"
@@ -65,21 +63,30 @@ case "$1" in
        else
                msg_not_running "NFS quota daemon"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status rpc.rquotad
        exit $?
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   probe)
        if [ ! -f /var/lock/subsys/quotad ]; then
                echo start; exit 0
        fi
-       /sbin/pidof rpc.rquotad >/dev/null 2>&1;
+       /sbin/pidof rpc.rquotad >/dev/null 2>&1
        if [ $? = 1 ]; then
                echo restart; exit 0
        fi
This page took 0.102167 seconds and 4 git commands to generate.