]> git.pld-linux.org Git - packages/autofs.git/commitdiff
- rewrited with new functions
authorwaszi <waszi@pld-linux.org>
Thu, 16 Mar 2000 06:19:17 +0000 (06:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autofs.init -> 1.12

autofs.init

index 0e97437080221d04aaee2d95318a8f21c7d99ba1..0cd4433de010acd716f6b11e79a4f96edd3cbaa2 100644 (file)
 . /etc/sysconfig/network
 
 # Demon specified configuration.
-. /etc/sysconfig/autofs
+[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs
 
 # Check that networking is up.
-if [ "${NETWORKING}" = "no" ]; then
-       echo "WARNING: Networking is down. Autofs service can't be runed."
-       exit 1
+if is_no "${NETWORKING}"; then
+        # nls "ERROR: Networking is down. %s can't be run." <service>
+        msg_Network_Down automounter
+        exit 1
 fi
-
+                       
 DAEMON=/usr/sbin/automount
 
 #
@@ -95,28 +96,31 @@ case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/automount ]; then
-               show Starting automounter
+                msg_starting automounter
                busy
                if getmounts | sh; then
                    deltext;ok
                else
                    deltext;ok
                fi
+                RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/automount
        else
-           echo "automount already is running"
+                msg_Already_Running automounter
+               exit 1
        fi
-       touch /var/lock/subsys/automount
        ;;
   stop)
-       show Stopping automounter
-       killproc automount -TERM
-       rm -f /var/lock/subsys/automount
+        if [ -f /var/lock/subsys/automount ]; then
+                msg_stopping automount -TERM
+                killproc automount
+                rm -f /var/lock/subsys/automount >/dev/null 2>&1
+        else
+                msg_Not_Running automounter
+                exit 1
+        fi
        ;;
-  restart|reload)
-       if [ ! -f /var/lock/subsys/automount ]; then
-               echo "Automounter not running"
-               exit 1
-       fi
+  restart)
        $0 stop
        $0 start
        ;;
@@ -130,8 +134,8 @@ case "$1" in
        )
        ;;
   *)
-       echo "Usage: $0 {start|stop|restart|reload|status}"
+       msg_Usage: "$0 {start|stop|restart|status}"
        exit 1
 esac
 
-exit 0
+exit $RETVAL
This page took 0.030348 seconds and 4 git commands to generate.