Date: Tue, 8 Jan 2002 11:15:26 +0100 From: Thomas Quinot <quinot@inf.enst.fr> To: freebsd-bugs@FreeBSD.org, current@freebsd.org Subject: Re: conf/31358: Updated patch for -CURRENT Message-ID: <20020108111526.A772@shalmaneser.enst.fr> In-Reply-To: <200201081010.g08AA2j89901@freefall.freebsd.org>; from quinot@inf.enst.fr on Tue, Jan 08, 2002 at 02:10:02AM -0800 References: <200201081010.g08AA2j89901@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Le 2002-01-08, Thomas Quinot écrivait :
> case ${nfs_client_enable} in
> [Yy][Ee][Ss])
> + kldload nfsclient && nfsclient_in_kernel=1
Ooops, this is *far* too aggressive!
Here is a corrected version of the previous patch. Sorry!
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 11:12:14 2002
@@ -712,8 +712,33 @@
;;
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])
+ case $nfsclient_in_kernel in
+ 1)
+ ;;
+ *)
+ if kldload nfsclient
+ then
+ nfsclient_in_kernel=1
+ else
+ echo 'Warning: NFS client kernel module failed to load'
+ nfs_client_enable=NO
+ fi
+ ;;
+ 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 +757,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 +788,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-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020108111526.A772>
