3 # $FreeBSD: src/etc/rc.d/nfsclient,v 1.3 2002/10/12 10:31:31 schweikh Exp $
4 # $DragonFly: src/etc/rc.d/nfsclient,v 1.4 2004/01/27 00:42:45 rob Exp $
8 # REQUIRE: NETWORKING mountcritremote rpcbind
9 # KEYWORD: DragonFly shutdown
14 rcvar="nfs_client_enable"
15 start_cmd="nfsclient_start"
16 start_precmd="nfsclient_precmd"
17 stop_cmd="unmount_all"
19 # Load nfs module if it was not compiled into the kernel
22 if ! sysctl vfs.nfs >/dev/null 2>&1; then
23 if ! kldload nfs; then
24 warn 'Could not load nfs module'
34 # Run nfsiod and set some nfs client related sysctls
36 if [ -n "${nfs_client_flags}" ]; then
38 nfsiod ${nfs_client_flags}
41 if [ -n "${nfs_access_cache}" ]; then
42 echo "NFS access cache time=${nfs_access_cache}"
43 sysctl vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null
45 if [ -n "${nfs_bufpackets}" ]; then
46 sysctl vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null
54 # If /var/db/mounttab exists, some nfs-server has not been
55 # successfully notified about a previous client shutdown.
56 # If there is no /var/db/mounttab, we do nothing.
58 if checkyesno rpc_umntall_enable; then
59 if [ -f /var/db/mounttab ]; then
60 echo -n ' rpc.umntall'