freebsd-skq/etc/rc.d/automount
Edward Tomasz Napierala 35dd951c8c Make autofs(5) rc scripts run earlier, matching those for amd(8).
This helps when you have some daemons that need to access automounted shares.

PR:		221011
MFC after:	2 weeks
2017-11-04 15:52:16 +00:00

33 lines
414 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: automount
# REQUIRE: nfsclient automountd
# BEFORE: DAEMON
# KEYWORD: nojail shutdown
. /etc/rc.subr
name="automount"
rcvar="autofs_enable"
start_cmd="automount_start"
stop_cmd="automount_stop"
required_modules="autofs"
automount_start()
{
/usr/sbin/automount ${automount_flags}
}
automount_stop()
{
/sbin/umount -At autofs
}
load_rc_config $name
run_rc_command "$1"