Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2002 02:10:02 -0800 (PST)
From:      Thomas Quinot <quinot@inf.enst.fr>
To:        freebsd-bugs@FreeBSD.org
Subject:   conf/31358: Updated patch for -CURRENT
Message-ID:  <200201081010.g08AA2j89901@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/31358; it has been noted by GNATS.

From: Thomas Quinot <quinot@inf.enst.fr>
To: freebsd-gnats-submit@freebsd.org
Cc: current@freebsd.org
Subject: conf/31358: Updated patch for -CURRENT
Date: Tue, 8 Jan 2002 11:02:06 +0100

 Attached to this email is an update to the patch supplied with PR
 conf/31358, which fixes two issues:
   * amd can only be started when NFS client is enabled;
   * when nfs_client_enable is set and no NFS file systems are mounted
     at boot time from /etc/fstab, rc.network needs to ensure that the
     nfsclient module is loaded.
 
 Can someone please take a look at this PR?
 
 Thanks,
 Thomas.
 
 diff -u ../rc rc
 --- ../rc	Tue Jan  8 10:11:48 2002
 +++ rc	Tue Jan  8 10:42:38 2002
 @@ -103,6 +103,7 @@
  }
  
  chkdepend amd amd_enable        portmap portmap_enable
 +chkdepend amd amd_enable        NFS	nfs_client_enable
  chkdepend NFS nfs_server_enable portmap portmap_enable
  chkdepend NIS nis_server_enable portmap portmap_enable
  chkdepend NIS nis_client_enable portmap portmap_enable
 diff -u ../rc.network rc.network
 --- ../rc.network	Tue Jan  8 10:11:48 2002
 +++ rc.network	Tue Jan  8 10:57:58 2002
 @@ -712,8 +712,30 @@
  			;;
  		esac
  
 +		# Handle absent nfs client support
 +		if sysctl vfs.nfs >/dev/null 2>&1; then
 +			nfsclient_in_kernel=1
 +		else
 +			nfsclient_in_kernel=0
 +		fi
 +
  		case ${nfs_client_enable} in
  		[Yy][Ee][Ss])
 +			kldload nfsclient && nfsclient_in_kernel=1
 +
 +			case $nfsclient_in_kernel in
 +			1)
 +				;;
 +			*)
 +				echo 'Warning: NFS client kernel module failed to load'
 +				nfs_client_enable=NO
 +				;;
 +			esac
 +			;;
 +		esac
 +
 +		case "${nfs_client_enable}" in
 +		[Yy][Ee][Ss])
  			if [ -n "${nfs_access_cache}" ]; then
  				echo -n " NFS access cache time=${nfs_access_cache}"
  				sysctl vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null
 @@ -732,6 +754,27 @@
  				echo -n ' rpc.lockd';	rpc.lockd
  				;;
  			esac
 +
 +			case ${amd_enable} in
 +			[Yy][Ee][Ss])
 +				echo -n ' amd'
 +				case ${amd_map_program} in
 +				[Nn][Oo] | '')
 +					;;
 +				*)
 +					amd_flags="${amd_flags} `eval\
 +						${amd_map_program}`"
 +					;;
 +				esac
 +
 +				if [ -n "${amd_flags}" ]; then
 +					amd -p ${amd_flags}\
 +						> /var/run/amd.pid 2> /dev/null
 +				else
 +					amd 2> /dev/null
 +				fi
 +				;;
 +			esac
  			;;
  		esac
  
 @@ -742,26 +785,6 @@
  			rpc.umntall -k
  		fi
  
 -		case ${amd_enable} in
 -		[Yy][Ee][Ss])
 -			echo -n ' amd'
 -			case ${amd_map_program} in
 -			[Nn][Oo] | '')
 -				;;
 -			*)
 -				amd_flags="${amd_flags} `eval\
 -					${amd_map_program}`"
 -				;;
 -			esac
 -
 -			if [ -n "${amd_flags}" ]; then
 -				amd -p ${amd_flags}\
 -					> /var/run/amd.pid 2> /dev/null
 -			else
 -				amd 2> /dev/null
 -			fi
 -			;;
 -		esac
  		;;
  	esac
  
 -- 
 Thomas Quinot ** Département Informatique & Réseaux ** quinot@inf.enst.fr
               ENST   //   46 rue Barrault   //   75634 PARIS CEDEX 13 

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?200201081010.g08AA2j89901>