]> git.pld-linux.org Git - packages/autofs.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 26 Sep 2006 18:52:12 +0000 (18:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autofs.init -> 1.30

autofs.init

index aff3f1794f5856c46dea4db9796e935c18f5591c..1ba4b2f47404eb7ff2c7b48563c82dd3fc4694de 100644 (file)
@@ -102,10 +102,7 @@ if is_yes $USE_YP; then
 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/autofs ]; then
                msg_starting automounter
@@ -117,8 +114,9 @@ case "$1" in
        else
                msg_already_running automounter
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/autofs ]; then
                msg_stopping automounter
                killproc automount
@@ -126,11 +124,20 @@ case "$1" in
        else
                msg_not_running automounter
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   status)
        nls "Configured Mount Points:"
This page took 0.036332 seconds and 4 git commands to generate.