Add tip(1)'s emulation of cu(1) to tip's manual page.
[dragonfly.git] / etc / rc.d / mountd
1 #!/bin/sh
2 #
3 # $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/mountd,v 1.9 2002/10/12 10:31:31 schweikh Exp $
5 # $DragonFly: src/etc/rc.d/mountd,v 1.4 2004/01/27 00:42:45 rob Exp $
6 #
7
8 # PROVIDE: mountd
9 # REQUIRE: NETWORKING mountall beforemountlkm nfsserver rpcbind quota
10 # KEYWORD: DragonFly 
11
12 . /etc/rc.subr
13
14 name="mountd"
15 rcvar=`set_rcvar`
16 command="/sbin/${name}"
17 required_files="/etc/exports"
18 start_precmd="mountd_precmd"
19 extra_commands="reload"
20
21 mountd_precmd()
22 {
23         if ! checkyesno rpcbind_enable  && \
24         ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
25         then
26                 force_depend rpcbind || return 1
27         fi
28         # mountd flags will differ depending on rc.conf settings
29         #
30         case ${nfs_server_enable} in
31         [Yy][Ee][Ss])
32                 if checkyesno weak_mountd_authentication; then
33                         mountd_flags="${mountd_flags} -n"
34                 fi
35                 ;;
36         *)
37                 if checkyesno mountd_enable; then
38                         checkyesno weak_mountd_authentication && mountd_flags="-n"
39                 fi
40         esac
41         rm -f /var/db/mountdtab
42         ( umask 022 ; > /var/db/mountdtab )
43         return 0
44 }
45
46 load_rc_config $name
47 run_rc_command "$1"