]> git.pld-linux.org Git - packages/autofs.git/commitdiff
Standarized all rc scripts.
authorkloczek <kloczek@pld-linux.org>
Sun, 18 Jul 1999 02:03:49 +0000 (02:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autofs.init -> 1.7

autofs.init

index d4bec538d41afa6fc63f1ccd2205b4b538d1f0d2..09e4dcfad00938331dae0408743f6ba97e706904 100644 (file)
@@ -1,29 +1,31 @@
 #!/bin/sh
 #
-#       $Id$
+# autofs       automatically mounts filesystems when you use them,
+#              and unmounts them later when you are not using them.
 #
-#      /etc/rc.d/init.d/autofs
+# chkconfig:   2345 72 08
 #
-#      rc file for automount using a Sun-style "master map".
-#      We first look for a local /etc/autofs/auto.master, then a YP
-#      map with that name
+# description: Script for automount using a Sun-style "master map".
+#              We first look for a local /etc/autofs/auto.master, then a YP
+#              map with that name
 #
-# chkconfig: 2345 72 08
-# description: automatically mounts filesystems when you use \
-#   them, and unmounts them later when you are not using them.
-# processname: automount
-#   Note that there may be multiple processes names automount
-# config: /etc/autofs/auto.master
-#   Note that all other config files are automatically reloaded
-#   and may be different on different systems; we can ignore them
-#   here
+# processname: automount
+# config:      /etc/autofs/auto.master
 
-# Source function library.
+
+# Source function library
 . /etc/rc.d/init.d/functions
 
-[ -f /usr/sbin/automount ] || exit 0
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/inetd ] && . /etc/sysconfig/inetd
+
+# Check that networking is up.
+[ "${NETWORKING}" = "no" ] && echo "Error: Networking is down"; exit 0
+
 
-#
 #      We can add local options here
 #      e.g. localoptions='rsize=8192,wsize=8192'
 #
@@ -100,17 +102,17 @@ fi
 #
 case "$1" in
   start)
-       # Check if the automounter is already running?
+       # Check if the service is already running?
        if [ ! -f /var/lock/subsys/automount ]; then
-           show Starting automounter
-           busy
-           getmounts | sh
-           touch /var/lock/subsys/automount
-           deltext
-           ok
+               show Starting automounter
+               busy
+               getmounts | sh
+               deltext
+               ok
        else
-           echo "Automounter already is running"
+           echo "automount already is running"
        fi
+       touch /var/lock/subsys/automount
        ;;
   stop)
        show Stopping automounter
This page took 0.109649 seconds and 4 git commands to generate.