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>
This commit is contained in:
Sheldon Hearn 2002-01-28 11:05:01 +00:00
parent 831c910a30
commit 3e38757beb
8 changed files with 358 additions and 252 deletions

View File

@ -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
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
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
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

1
etc/rc
View File

@ -103,6 +103,7 @@ chkdepend() {
}
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

View File

@ -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
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
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
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

View File

@ -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
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
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
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

View File

@ -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
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
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
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

View File

@ -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
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
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
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

View File

@ -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
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
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
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

View File

@ -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
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
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
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