From owner-freebsd-bugs Tue Jan 8 3:50: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A4E8737B417 for ; Tue, 8 Jan 2002 03:50:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g08Bo3s07063; Tue, 8 Jan 2002 03:50:03 -0800 (PST) (envelope-from gnats) Date: Tue, 8 Jan 2002 03:50:03 -0800 (PST) Message-Id: <200201081150.g08Bo3s07063@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mike Makonnen Subject: Re: conf/31358: Updated patch for -CURRENT Reply-To: Mike Makonnen Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR conf/31358; it has been noted by GNATS. From: Mike Makonnen To: Thomas Quinot Cc: freebsd-gnats-submit@freebsd.org, current@freebsd.org Subject: Re: conf/31358: Updated patch for -CURRENT Date: Tue, 08 Jan 2002 03:42:19 -0800 On Tue, 8 Jan 2002 11:02:06 +0100 Thomas Quinot wrote: [snip] > + # Handle absent nfs client support > + if sysctl vfs.nfs >/dev/null 2>&1; then > + nfsclient_in_kernel=1 > + else > + nfsclient_in_kernel=0 > + fi > + This should be handled inside the case statement for ${nfs_client_enable}, as you want to load the nfsclient kld only if the nfs client is enabled. > 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 You should clean this up so there is only *one* 'case "${nfs_client_enable}"'. Look at the implementation of case ${nfs_server_enable}, earlier in rc.network for an example of how it should be done. Cheers, mike makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message