From owner-freebsd-current Tue Jan 8 3:42: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by hub.freebsd.org (Postfix) with ESMTP id 7D6A337B41E; Tue, 8 Jan 2002 03:41:57 -0800 (PST) Received: from blackbox.pacbell.net ([64.173.10.230]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GPM00ASEB5PSQ@mta7.pltn13.pbi.net>; Tue, 08 Jan 2002 03:41:49 -0800 (PST) Received: (from mikem@localhost) by blackbox.pacbell.net (8.11.6/8.11.6) id g08BgJZ42494; Tue, 08 Jan 2002 03:42:19 -0800 (PST envelope-from mikem) Date: Tue, 08 Jan 2002 03:42:19 -0800 From: Mike Makonnen Subject: Re: conf/31358: Updated patch for -CURRENT In-reply-to: <20020108110201.A36413@shalmaneser.enst.fr> To: Thomas Quinot Cc: freebsd-gnats-submit@freebsd.org, current@freebsd.org Message-id: <200201081142.g08BgJZ42494@blackbox.pacbell.net> MIME-version: 1.0 X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i386--freebsd5.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20020108110201.A36413@shalmaneser.enst.fr> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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-current" in the body of the message