aboutsummaryrefslogtreecommitdiffstats
path: root/samples/rc.autofs.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2000-01-22 22:17:31 +0000
committerH. Peter Anvin <hpa@zytor.com>2000-01-22 22:17:31 +0000
commit58ce3bea37f11479b1bfbc7b77eab37dc1b621f7 (patch)
treefff8de24aebc67baa4a86152572e6798f7559d88 /samples/rc.autofs.in
parentc9c952121b53417f53a5487b85e5a067cdf2b235 (diff)
downloadautofs3-58ce3bea37f11479b1bfbc7b77eab37dc1b621f7.tar.gz
autofs3-58ce3bea37f11479b1bfbc7b77eab37dc1b621f7.tar.xz
autofs3-58ce3bea37f11479b1bfbc7b77eab37dc1b621f7.zip
Commit changes as of 3.1.4 release
Diffstat (limited to 'samples/rc.autofs.in')
-rw-r--r--samples/rc.autofs.in21
1 files changed, 13 insertions, 8 deletions
diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
index 86aa26a..cdf638b 100644
--- a/samples/rc.autofs.in
+++ b/samples/rc.autofs.in
@@ -10,6 +10,11 @@
# /etc/rc.d/init.d/autofs or /etc/init.d/autofs
#
+# For Redhat-ish systems
+#
+# chkconfig: 345 15 85
+# description: Automounts filesystems on demand
+
# This is used in the Debian distribution to determine the proper
# location for the S- and K-links to this init file.
# The following value is extracted by debstd to figure out how to
@@ -44,7 +49,7 @@ fi
test -e $DAEMON || exit 0
thisscript="$0"
-if [ ! test -f $thisscript ]; then
+if [ ! -f "$thisscript" ]; then
echo "$0: Cannot find myself" 1>&2
exit 1
fi
@@ -145,18 +150,18 @@ function redhat()
case "$1" in
start)
# Check if the automounter is already running?
- if [ ! -f /var/lock/subsys/automount ]; then
+ if [ ! -f /var/lock/subsys/autofs ]; then
echo 'Starting automounter: '
getmounts | sh
- touch /var/lock/subsys/automount
+ touch /var/lock/subsys/autofs
fi
;;
stop)
kill -TERM $(/sbin/pidof /usr/sbin/automount)
- rm -f /var/lock/subsys/automount
+ rm -f /var/lock/subsys/autofs
;;
reload|restart)
- if [ ! -f /var/lock/subsys/automount ]; then
+ if [ ! -f /var/lock/subsys/autofs ]; then
echo "Automounter not running"
exit 1
fi
@@ -204,7 +209,7 @@ case "$1" in
getmounts | while read cmd mnt rest
do
echo -n " $mnt"
- pidfile=/var/run/automount`echo $mnt | sed 's/\//./'`.pid
+ pidfile=/var/run/autofs`echo $mnt | sed 's/\//./'`.pid
start-stop-daemon --start --pidfile $pidfile --quiet \
--exec $DAEMON -- $mnt $rest
#
@@ -225,9 +230,9 @@ case "$1" in
;;
reload|restart)
echo "Reloading automounter: checking for changes ... "
- TMP=/var/run/automount.tmp
+ TMP=/var/run/autofs.tmp
getmounts >$TMP
- for i in /var/run/automount.*.pid
+ for i in /var/run/autofs.*.pid
do
pid=`head -n 1 $i 2>/dev/null`
[ "$pid" = "" ] && continue