summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2008-06-22 15:40:19 +0000
committermtm <mtm@FreeBSD.org>2008-06-22 15:40:19 +0000
commitee7a7b62e7acd77e4310b2eb40b8b8d1f64dd8ed (patch)
tree68f133ce216efc5a80eb4f231dd15a187aedd74d
parent0cb079251abec91939985b82a7857384c40d85af (diff)
downloadFreeBSD-src-ee7a7b62e7acd77e4310b2eb40b8b8d1f64dd8ed.zip
FreeBSD-src-ee7a7b62e7acd77e4310b2eb40b8b8d1f64dd8ed.tar.gz
Don't say we're going to mount filesystems of a certain type unless
there actually are filesystems of that type to mount.
-rwxr-xr-xetc/rc.d/mountcritremote12
-rw-r--r--etc/rc.d/mountlate21
2 files changed, 25 insertions, 8 deletions
diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote
index 94a37dc..ff965da 100755
--- a/etc/rc.d/mountcritremote
+++ b/etc/rc.d/mountcritremote
@@ -36,9 +36,15 @@ mountcritremote_start()
{
# Mount nfs filesystems.
#
- echo -n 'Mounting NFS file systems:'
- mount -a -t nfs
- echo '.'
+ case "`/sbin/mount -d -a -t nfs`" in
+ '')
+ ;;
+ *)
+ echo -n 'Mounting NFS file systems:'
+ mount -a -t nfs
+ echo '.'
+ ;;
+ esac
# Mount other network filesystems if present in /etc/fstab.
case ${extra_netfs_types} in
diff --git a/etc/rc.d/mountlate b/etc/rc.d/mountlate
index 6c5ea0f..5b8ff73 100644
--- a/etc/rc.d/mountlate
+++ b/etc/rc.d/mountlate
@@ -16,13 +16,24 @@ stop_cmd=":"
mountlate_start()
{
- local err
+ local err latefs
# Mount "late" filesystems.
- echo -n 'Mounting late file systems:'
- mount -a -l
- err=$?
- echo '.'
+ #
+ err=0
+ latefs=
+ # / (root) fs is always remounted, so remove from list
+ latefs="`/sbin/mount -d -a -l | grep -v ' /$'`"
+ case ${latefs} in
+ '')
+ ;;
+ *)
+ echo -n 'Mounting late file systems:'
+ mount -a -l
+ err=$?
+ echo '.'
+ ;;
+ esac
case ${err} in
0)
OpenPOWER on IntegriCloud