From owner-freebsd-bugs Sat Mar 25 0:20: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9108837B8A4 for ; Sat, 25 Mar 2000 00:20:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA02474; Sat, 25 Mar 2000 00:20:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from dt051n0b.san.rr.com (dt051n0b.san.rr.com [204.210.32.11]) by hub.freebsd.org (Postfix) with ESMTP id A06C637B8AF for ; Sat, 25 Mar 2000 00:13:09 -0800 (PST) (envelope-from doug@dt051n0b.san.rr.com) Received: (from doug@localhost) by dt051n0b.san.rr.com (8.9.3/8.9.3) id AAA88605; Sat, 25 Mar 2000 00:13:08 -0800 (PST) (envelope-from doug) Message-Id: <200003250813.AAA88605@dt051n0b.san.rr.com> Date: Sat, 25 Mar 2000 00:13:08 -0800 (PST) From: Doug@gorean.org Reply-To: Doug@gorean.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: conf/17594: [PATCH] Clarify NFS filesystem mounting at boot Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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