Hi David,

On 14-Feb-00 David Wolfskill wrote:
> I discovered this under 3.4-R, and checked that it's still the case
> for 4.0-RC.
> 
> I'm putting together a box that has no reason whatsoever to use or
> provide any NFS services at all.
> 
> It was thus with a sense of "POLA violation" that I happened across the
> message
> 
>       Mounting NFS file systems
> 
> in the boot-up messages.
> 
> 
> Turns out that the stanza that generates that (in /etc/rc) looks like:
> 
> echo -n "Mounting NFS file systems"
> mount -a -t nfs
> echo .
> 
> ...as in, this isn't conditional on anything.

It is conditional, in such as -t is used for mount. The arg '-t nfs' tells 
us that only nfs filesystems are mounted in this pass of mount. If you
don't have any nfs file systems listed in /etc/fstab it won't do anything.

Perhaps it should be testing the success or failure of the nfs mount and
echo an appropriate message to avoid any confusion.


> OK; fine.  Maybe I'm not a programmer (any more), but this seems to
> work OK:
> 
> -----%<----------------
> 
> --- rc        Tue Feb  8 22:32:40 2000
> +++ /tmp/rc   Mon Feb 14 14:11:01 2000
> @@ -191,9 +191,14 @@
>       network_pass1
>  fi
>  
> -# Mount NFS filesystems.
> -echo -n "Mounting NFS file systems"
> -mount -a -t nfs
> +case ${nfs_client_enable} in
> +[Yy][Ee][Ss])
> +     # Mount NFS filesystems.
> +     echo -n "Mounting NFS file systems"
> +     mount -a -t nfs
> +     ;;
> +esac
> +
>  echo .
>  
>  # Whack the pty perms back into shape.
> 
> ----->%----------------
> 
> Downside is that it's possible that there are machines that actually *do*
> act as NFS clients, even though nfs_client_enable is not set affirmatively.
> Then again, it could be argued that a new release would be one of the
> better times to make this kind of change, eh...?  :-)
> 

I guess you can do the previous, but I'd be a bit wary.  If you have a look
in /etc/rc.network nfs_client_enable runs the nfsiod 'helper' app.  Someone
may have the need to mount nfs filesystems without also using nfsiod. If you
*really* need to make this more conditional (essentially removing the echo)
I'd say create a new varible in /etc/rc.conf (mount_nfs_systems="YES"??) and
test on that. 



Best Regards

Kent Ibbetson
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to