summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-12-27 13:41:27 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-12-27 13:41:27 +0000
commit3aee09fd5eb448f8da632ed20a2dedd3380df5b2 (patch)
tree69e6a4dfd4e1e8c2aab2a8a47eeb1b5f7763d5cb /etc/rc
parent7ee6de3f93457bd63be69aa00d5580bf67e1e647 (diff)
downloadFreeBSD-src-3aee09fd5eb448f8da632ed20a2dedd3380df5b2.zip
FreeBSD-src-3aee09fd5eb448f8da632ed20a2dedd3380df5b2.tar.gz
Re-introduce the fix that delays mounting of network filesystems until
the network is initialized. This was first implemented in rev 1.268 of src/etc/rc, but was backed out at wollman's request. The objection was that the right place for the fix is in mount(8). Having looked at that problem, I find it hard to believe that the hoops one would have to jump through can be justified by the desire for purity alone. Note that there are reported issues surrounding nfsclient kernel support and mount_nfs(8), which currently make NFS an ugly exception to the general case. With this change, systems with non-NFS network filesystems configured for mounting on startup in /etc/fstab are no longer guaranteed to fail on startup.
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc33
1 files changed, 32 insertions, 1 deletions
diff --git a/etc/rc b/etc/rc
index e738569..fc784b9 100644
--- a/etc/rc
+++ b/etc/rc
@@ -268,7 +268,16 @@ esac
umount -a >/dev/null 2>&1
# Mount everything except nfs filesystems.
-mount -a -t nonfs
+if [ -z "${networkfs_types}" ]; then
+ networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL'
+fi
+mount_excludes='no'
+for i in ${networkfs_types}; do
+ fstype=${i%:*}
+ mount_excludes="${mount_excludes}${fstype},"
+done
+mount_excludes=${mount_excludes%,}
+mount -a -t ${mount_excludes}
case $? in
0)
@@ -407,6 +416,11 @@ case ${ipv6_enable} in
esac
# Mount NFS filesystems if present in /etc/fstab
+#
+# XXX When the vfsload() issues with nfsclient support and related sysctls
+# have been resolved, this block can be removed, and the condition that
+# skips nfs in the following block (for "other network filesystems") can
+# be removed.
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
# Handle absent nfs client support
@@ -430,6 +444,23 @@ case "`mount -d -a -t nfs 2> /dev/null`" in
;;
esac
+# Mount other network filesystems if present in /etc/fstab
+for i in ${networkfs_types}; do
+ fstype=${i%:*}
+ fsdecr=${i#*:}
+
+ if [ "${fstype}" = "nfs" ]; then
+ continue
+ fi
+ case "`mount -d -a -t ${fstype}`" in
+ *mount_${fstype}*)
+ echo -n "Mounting ${fsdecr} file systems:"
+ mount -a -t ${fstype}
+ echo '.'
+ ;;
+ esac
+done
+
# Whack the pty perms back into shape.
#
if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then
OpenPOWER on IntegriCloud