From gordont@gnf.org  Mon Oct  1 15:51:14 2001
Return-Path: <gordont@gnf.org>
Received: from relay.gnf.org (relay.gnf.org [208.44.31.36])
	by hub.freebsd.org (Postfix) with ESMTP id 19EAD37B40A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  1 Oct 2001 15:51:14 -0700 (PDT)
Received: from mail.gnf.org (smtp.gnf.org [10.0.0.11])
	by relay.gnf.org (8.11.6/8.11.6) with ESMTP id f91MpCj06713
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 1 Oct 2001 15:51:12 -0700
Received: by mail.gnf.org (Postfix, from userid 888)
	id C1C3911E503; Mon,  1 Oct 2001 15:50:25 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by mail.gnf.org (Postfix) with ESMTP id BD96111A576
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  1 Oct 2001 15:50:25 -0700 (PDT)
Message-Id: <Pine.LNX.4.33.0110011549360.31837-100000@smtp.gnf.org>
Date: Mon, 1 Oct 2001 15:50:24 -0700 (PDT)
From: Gordon Tetlow <gordont@gnf.org>
To: <FreeBSD-gnats-submit@freebsd.org>
Subject: nfsd and mountd are in the wrong location

>Number:         30972
>Category:       bin
>Synopsis:       nfsd and mountd are in the wrong location
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 01 16:00:01 PDT 2001
>Closed-Date:    Sun Jul 07 15:24:09 PDT 2002
>Last-Modified:  Sun Jul 07 15:24:09 PDT 2002
>Originator:     Gordon Tetlow
>Release:        FreeBSD 4.4-RC i386
>Organization:
GNF
>Environment:
System: FreeBSD fountainhead.gnf.org 4.4-RC FreeBSD 4.4-RC #0: Thu Aug 16 09:16:05 PDT 2001 gordont@fountainhead.gnf.org:/local/usr.obj/usr/src/sys/FOUNTAINHEAD i386

>Description:
	nfsd and mountd are in /sbin. Meanwhile rpcbind/portmap is in /usr/sbin
	It seems rather pointless to have nfsd/mountd taking up root partition
	space (statically linked no less) when they are absolutely useless
	without something from /usr/sbin

	Also, there isn't much need to have them in the root since you most
	likely aren't going to be exporting filesystems until fully booted.

	NetBSD has nfsd/mountd in /usr/sbin
	OpenBSD has nfsd/mountd in /sbin

>How-To-Repeat:
	ls -l /sbin/nfsd /sbin/mountd
	ls -l /usr/sbin/portmap /usr/sbin/rpcbind

>Fix:
	Move nfsd and mountd out of /sbin into /usr/sbin where they rightfully
	belong. This should be accompanied by a repo-copy.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Wed Oct 3 17:35:58 PDT 2001 
Responsible-Changed-Why:  
Peter has been rearraging NFS code in the tree, the nfsclient and 
nfsserver stuff. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30972 

From: Gordon Tetlow <gordont@gnf.org>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc: <hackers@FreeBSD.org>
Subject: Re: bin/30972: nfsd and mountd are in the wrong location
Date: Wed, 10 Oct 2001 13:21:38 -0700 (PDT)

 Here is a diff that fixes a couple of issues and will facilitate moving
 nfsd and mountd into /usr/sbin
 
 This also removes the bogus nfs_client_flags since it is no longer used.
 
 This needs to happen to make migrating to the rc.d system easier.
 
 -gordon
 
 diff -ur /usr/src/etc/defaults/rc.conf etc.nfsd/defaults/rc.conf
 --- /usr/src/etc/defaults/rc.conf	Wed Oct 10 09:36:28 2001
 +++ etc.nfsd/defaults/rc.conf	Wed Oct 10 09:43:11 2001
 @@ -159,15 +159,16 @@
  amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map"
  amd_map_program="NO"		# Can be set to "ypcat -k amd.master"
  nfs_client_enable="NO"		# This host is an NFS client (or NO).
 -nfs_client_flags="-n 4"		# Flags to nfsiod (if enabled).
  nfs_access_cache="2"		# Client cache timeout in seconds
 +nfs_bufpackets="DEFAULT"	# bufspace (in packets) for client (or DEFAULT)
  nfs_server_enable="NO"		# This host is an NFS server (or NO).
 +nfs_server_program="/usr/sbin/nfsd"	# path to nfsd
  nfs_server_flags="-u -t -n 4"	# Flags to nfsd (if enabled).
  single_mountd_enable="NO"       # Run mountd only (or NO).
 +mountd_program="/usr/sbin/mountd"	# path to mountd
  mountd_flags="-r"		# Flags to mountd (if NFS server enabled).
  weak_mountd_authentication="NO"	# Allow non-root mount requests to be served.
  nfs_reserved_port_only="NO"	# Provide NFS only on secure port (or NO).
 -nfs_bufpackets="DEFAULT"	# bufspace (in packets) for client (or DEFAULT)
  rpc_lockd_enable="NO"		# Run NFS rpc.lockd (*broken!*) if nfs_server.
  rpc_statd_enable="NO"		# Run NFS rpc.statd if nfs_server (or NO).
  portmap_enable="NO"		# Run the portmapper service (YES/NO).
 diff -ur /usr/src/etc/rc.network etc.nfsd/rc.network
 --- /usr/src/etc/rc.network	Fri Sep 21 10:53:51 2001
 +++ etc.nfsd/rc.network	Wed Oct 10 10:29:47 2001
 @@ -614,7 +614,7 @@
  					;;
  				esac
 
 -				mountd ${mountd_flags}
 +				${mountd_program} ${mountd_flags}
 
  				case ${nfs_reserved_port_only} in
  				[Yy][Ee][Ss])
 @@ -623,7 +623,8 @@
  					;;
  				esac
 
 -				echo -n ' nfsd';	nfsd ${nfs_server_flags}
 +				echo -n ' nfsd';
 +				${nfsd_server_program} ${nfs_server_flags}
 
  				case ${rpc_lockd_enable} in
  				[Yy][Ee][Ss])
 @@ -659,7 +660,6 @@
 
  		case ${nfs_client_enable} in
  		[Yy][Ee][Ss])
 -			#echo -n ' nfsiod';	nfsiod ${nfs_client_flags}
  			if [ -n "${nfs_access_cache}" ]; then
  				echo -n " NFS access cache time=${nfs_access_cache}"
  				sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null
 

From: John Baldwin <jhb@FreeBSD.org>
To: Gordon Tetlow <gordont@gnf.org>
Cc: hackers@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/30972: nfsd and mountd are in the wrong location
Date: Wed, 10 Oct 2001 13:47:59 -0700 (PDT)

 On 10-Oct-01 Gordon Tetlow wrote:
 > Here is a diff that fixes a couple of issues and will facilitate moving
 > nfsd and mountd into /usr/sbin
 
 Err, you don't need this to move the binaries.  They will already be in the
 path so it will work fine with just 'mountd' and 'nfsd' as it does now.
  
 > This also removes the bogus nfs_client_flags since it is no longer used.
 
 I've committed that part.
  
 Something else that would really help here would be to update the rc.network
 script to kldload the nfsclient.ko and nfsserver.ko kernel modules if needed
 when nfs_client_enable and/or nfs_server_enable are set to YES.
 
 -- 
 
 John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
 PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
State-Changed-From-To: open->closed 
State-Changed-By: gordon 
State-Changed-When: Sun Jul 7 15:23:20 PDT 2002 
State-Changed-Why:  
nfsd and mountd have been moved to /usr/sbin 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30972 
>Unformatted:
