blob: 9e4252adf3eaea916bf067e9c225b93908450a76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.rc1,v 1.1 2008/02/05 12:32:20 stefaan Exp $
DAEMON=/usr/sbin/automount
PIDFILE=/var/run/autofs.pid
depend() {
need localmount
use ypbind nfs slapd portmap net
}
opts="start stop restart status reload"
start() {
ebegin "Starting automounter"
# ensure autofs support is loaded
grep -q autofs /proc/filesystems || modprobe -q autofs4 || modprobe -q autofs
if [ $? -ne 0 ]; then
eend 1 "No autofs support available"
return 1
fi
start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${daemonoptions}
eend $?
}
stop() {
ebegin "Stopping automounter"
start-stop-daemon --stop --quiet --signal TERM -p ${PIDFILE}
eend $?
}
reload() {
ebegin "Reloading automounter"
kill -HUP $(cat ${PIDFILE})
eend $?
}
|