Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2000 00:13:08 -0800 (PST)
From:      Doug@gorean.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/17594: [PATCH] Clarify NFS filesystem mounting at boot
Message-ID:  <200003250813.AAA88605@dt051n0b.san.rr.com>

next in thread | raw e-mail | index | archive | help

>Number:         17594
>Category:       conf
>Synopsis:       [PATCH] Clarify NFS filesystem mounting at boot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 25 00:20:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Doug
>Release:        FreeBSD 3.4-STABLE-0219 i386
>Organization:
AAAG
>Environment:

	Any FreeBSD system

>Description:

	During boot the /etc/rc script prints out, "Mounting NFS file systems"
regardless of whether there are actually any NFS filesystems to mount. This 
message is known to cause confusion for people who have no such filesystems.

	The attached patches test for the presence of NFS filesystems in 
/etc/fstab, and only print the "Mounting..." message if there are some 
to mount.

>How-To-Repeat:

	Boot, without NFS filesystems in /etc/fstab, get confused when
the system tells you it's mounting some anyway. :)

>Fix:
	
	The following patches have been tested on 5.0-Current and 
3.4-Stable. The 5.0 version will certainly work on 4.0-Stable as
well. 

5.0 version:

--- /usr/src/etc/rc	Tue Feb 29 20:41:52 2000
+++ /etc/rc	Sat Mar 25 00:09:24 2000
@@ -200,10 +206,12 @@
 	;;
 esac
 
-# Mount NFS filesystems.
-echo -n "Mounting NFS file systems"
-mount -a -t nfs
-echo .
+# Mount NFS filesystems if present in /etc/fstab.
+if mount -d -a -t nfs | grep nfs >/dev/null 2>&1 ; then
+	echo -n "Mounting NFS file systems"
+	mount -a -t nfs
+	echo .
+fi
 
 # Whack the pty perms back into shape.
 #


3.4 version:

--- /usr/src/etc/rc	Mon Jan 10 18:13:38 2000
+++ /etc/rc	Fri Mar 24 23:50:37 2000
@@ -172,9 +172,12 @@
 	network_pass1
 fi
 
-echo -n "Mounting NFS file systems"
-mount -a -t nfs
-echo .
+# Mount NFS filesystems if present in /etc/fstab.
+if mount -d -a -t nfs | grep nfs >/dev/null 2>&1 ; then
+	echo -n "Mounting NFS file systems"
+	mount -a -t nfs
+	echo .
+fi
 
 # Whack the pty perms back into shape.
 chflags 0 /dev/tty[pqrsPQRS]*


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003250813.AAA88605>