summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-06-09 09:47:05 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-06-09 09:47:05 +0000
commitcd6e2ac4a7d13dd54075ad5af02067fea959482f (patch)
treee89605ac72ff19a1e3bae61760bdf3b0440c887a /etc/rc
parent0cb0600dbeae43bbc578f4bdfb36c19154a9dddf (diff)
downloadFreeBSD-src-cd6e2ac4a7d13dd54075ad5af02067fea959482f.zip
FreeBSD-src-cd6e2ac4a7d13dd54075ad5af02067fea959482f.tar.gz
Fix /etc/rc so that all remote filesystems, not just NFS, are mounted
after the network is configured. Future remote filesystem types should be added to remote_fstypes, which is a whitespace-delimited list of type:description pairs. The specific problem this fixes right now is that smbfs mounts described in /etc/ftsab were failing.
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc31
1 files changed, 21 insertions, 10 deletions
diff --git a/etc/rc b/etc/rc
index 717a339..413f50d 100644
--- a/etc/rc
+++ b/etc/rc
@@ -261,8 +261,15 @@ esac
umount -a >/dev/null 2>&1
-# Mount everything except nfs filesystems.
-mount -a -t nonfs
+# Mount everything except remote filesystems.
+remotefs_types='nfs:NFS smbfs:SMB'
+mount_excludes='no'
+for i in ${remotefs_types}; do
+ fstype=${i%:*}
+ mount_excludes="${mount_excludes}${fstype},"
+done
+mount_excludes=${mount_excludes%,}
+mount -a -t ${mount_excludes}
case $? in
0)
@@ -397,14 +404,18 @@ case ${ipv6_enable} in
;;
esac
-# Mount NFS filesystems if present in /etc/fstab
-case "`mount -d -a -t nfs 2> /dev/null`" in
-*mount_nfs*)
- echo -n 'Mounting NFS file systems:'
- mount -a -t nfs
- echo '.'
- ;;
-esac
+# Mount remote filesystems if present in /etc/fstab
+for i in ${remotefs_types}; do
+ fstype=${i%:*}
+ fsdecr=${i#*:}
+ 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.
#
OpenPOWER on IntegriCloud