NetBSD/etc/rc.d/mountd

33 lines
595 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: mountd,v 1.14 2021/02/16 10:02:42 hannken Exp $
#
# PROVIDE: mountd
# REQUIRE: NETWORKING mountall rpcbind quota
$_rc_subr_loaded . /etc/rc.subr
name="mountd"
rcvar=$name
command="/usr/sbin/${name}"
required_files="/etc/exports"
start_precmd="mountd_precmd"
extra_commands="reload"
mountd_precmd()
{
rm -f /var/db/mountdtab
( umask 022 ; > /var/db/mountdtab )
if checkyesno zfs; then
if [ ! -r /etc/zfs/exports ]; then
touch /etc/zfs/exports
fi
rc_flags="${rc_flags} /etc/exports /etc/zfs/exports"
fi
return 0
}
load_rc_config $name
run_rc_command "$1"