diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2002-01-28 11:05:01 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2002-01-28 11:05:01 +0000 |
commit | c8bf94da48b4e969fb0fdb65ee0e3abe52eeafd4 (patch) | |
tree | 3dfc19c0a4587ca39a17773b81e22b314aeb96a3 /etc/network.subr | |
parent | 8c5c420dd348f19c005d418b7ae2b974c9c4048d (diff) | |
download | FreeBSD-src-c8bf94da48b4e969fb0fdb65ee0e3abe52eeafd4.zip FreeBSD-src-c8bf94da48b4e969fb0fdb65ee0e3abe52eeafd4.tar.gz |
Register amd's dependency on NFS.
This change was submitted to the freebsd-audit mailing list for review
but received no feedback. Hindsight-enabled reviews are welcome.
PR: conf/31358
Submitted: Thomas Quinot <thomas@cuivre.fr.eu.org>
Diffstat (limited to 'etc/network.subr')
-rw-r--r-- | etc/network.subr | 87 |
1 files changed, 51 insertions, 36 deletions
diff --git a/etc/network.subr b/etc/network.subr index c75d57d..730c096 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -714,24 +714,59 @@ network_pass3() { 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 - fi - if [ -n "${nfs_bufpackets}" ]; then - sysctl vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + nfsclient_in_kernel=0 + # Handle absent nfs client support + if sysctl vfs.nfs >/dev/null 2>&1; then + nfsclient_in_kernel=1 + else + kldload nfsclient && nfsclient_in_kernel=1 fi - case ${rpc_statd_enable} in - [Yy][Ee][Ss]) - echo -n ' rpc.statd'; rpc.statd - ;; - esac - case ${rpc_lockd_enable} in - [Yy][Ee][Ss]) - echo -n ' rpc.lockd'; rpc.lockd - ;; - esac + if [ ${nfsclient_in_kernel} -eq 1 ] + then + 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 + fi + if [ -n "${nfs_bufpackets}" ]; then + sysctl vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + 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 + else + echo 'Warning: NFS client kernel module failed to load' + nfs_client_enable=NO + fi ;; esac @@ -742,26 +777,6 @@ network_pass3() { 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 |