1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/autofs/autofs.init
3 # Copyright (C) 2004 - 2022 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # Desc: Kernel Automounter Daemon
17 PATH=/sbin:/usr/sbin:/bin:/usr/bin
20 # We can add local options here
21 # e.g. localoptions='rsize=8192,wsize=8192'
27 if [ -f /etc/auto.master ]
29 cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d'| (
30 while read dir map options
32 if [ ! -z "$dir" -a ! -z "$map" \
33 -a "$(echo "$map" | cut -c1)" != "-" ]
35 map=$(echo "/etc/$map" | sed -e 's:^/etc//:/:')
36 options=$(echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g')
38 echo "automount $dir program $map $options $localoptions"
39 elif [ -f $map ]; then
40 echo "automount $dir file $map $options $localoptions"
42 echo "automount $dir $(basename $map) $options $localoptions"
52 echo "Configured Mount Points:"
53 echo "------------------------"
56 echo "Active Mount Points:"
57 echo "--------------------"
58 ps ax|grep "[0-9]:[0-9][0-9] automount " | (
59 while read pid tt stat time command; do echo $command; done
65 block_begin(start, `Starting automounter')
66 check(`getmounts | sh -e')
69 block_begin(stop, `Stopping automounter')
70 check(`killall automount')
71 if sleep 1 ; [ "$(pidof /usr/sbin/automount)" ]; then
72 check(`killall -9 automount')
74 if sleep 1 ; [ "$(pidof /usr/sbin/automount)" ]; then
75 echo "Not able to stop processes: $(pidof /usr/sbin/automount)"