3 # $NetBSD: mountcritremote,v 1.7 2002/04/29 12:29:53 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/mountcritremote,v 1.6 2003/06/01 01:43:37 gordon Exp $
7 # PROVIDE: mountcritremote
8 # REQUIRE: NETWORKING root mountcritlocal cleanvar
12 name="mountcritremote"
15 start_cmd="mountcritremote_start"
16 start_precmd="mountcritremote_precmd"
18 # Mount NFS filesystems if present in /etc/fstab
20 # XXX When the vfsload() issues with nfsclient support and related sysctls
21 # have been resolved, this block can be removed, and the condition that
22 # skips nfs in the following block (for "other network filesystems") can
25 mountcritremote_precmd()
27 case "`mount -d -a -t nfs 2> /dev/null`" in
29 # Handle absent nfs client support
30 if ! sysctl vfs.nfs >/dev/null 2>&1; then
31 kldload nfs || warn 'nfs mount ' \
32 'requested, but no nfs client in kernel' \
40 mountcritremote_start()
42 # Mount nfs filesystems.
44 echo -n 'Mounting NFS file systems:'
47 # Mount other network filesystems if present in /etc/fstab.
48 case ${extra_netfs_types} in
52 netfs_types="${netfs_types} ${extra_netfs_types}"
55 for i in ${netfs_types}; do
58 [ "${fstype}" = "nfs" ] && continue
59 case "`mount -d -a -t ${fstype}`" in
61 echo -n "Mounting ${fsdecr} file systems:"
68 # Cleanup /var again just in case it's a network mount.
69 /etc/rc.d/cleanvar reload
70 rm -f /var/run/clean_var /var/spool/lock/clean_var