Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 15:10:50 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Doug Barton <DougB@gorean.org>
Cc:        Jeroen Ruigrok van der Werven <asmodai@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/etc rc
Message-ID:  <Pine.BSF.4.21.0005291450550.1464-100000@besplex.bde.org>
In-Reply-To: <39318FE0.604973F3@gorean.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 28 May 2000, Doug Barton wrote:

> Bruce Evans wrote:
> 
> > > To: doug@gorean.com
> 
> 	I'm @gorean.org. I'd never dis' you like that Bruce. :)  You are of

Oops.  There is a gorean.com, and it seems to have blackholed the mail.

> course exactly correct, I don't know what I was thinking there. The
> attached patch does the right thing, tested both with and without nfs
> mounts in /etc/fstab. 

> Index: rc
> ===================================================================
> RCS file: /usr/ncvs/src/etc/rc,v
> retrieving revision 1.216
> diff -u -r1.216 rc
> --- rc	2000/05/11 06:31:59	1.216
> +++ rc	2000/05/28 20:40:41
> @@ -202,11 +202,14 @@
>  esac
>  
>  # Mount NFS filesystems if present in /etc/fstab
> -if mount -d -a -t nfs | grep -q nfs >/dev/null 2>&1; then
> +test_nfs_in_fstab=`mount -d -a -t nfs`
> +case "${test_nfs_in_fstab}" in
> +*mount_nfs*)
>  	echo -n "Mounting NFS file systems"
>  	mount -a -t nfs
>  	echo .
> -fi
> +	;;
> +esac
> ...

I think this can be simplified to

    if [ "`mount -d -a -t nfs`" != "" ]; then
    ...

(since -t nfs already filters out everything that doesn't match *mount_nfs*).

While testing this, I noticed that mount -a always remounts "/".  "/" is
special because mount -u is implicit for it.  However, null updates
probably shouldn't be done.

Bruce



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005291450550.1464-100000>