1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-31 12:13:10 +00:00

Handle the lack of nfs server or client support in the kernel by

kldload'ing the appropriate modules before enabling the service.
This commit is contained in:
Doug Barton 2001-10-19 06:50:52 +00:00
parent f1ef0a68b0
commit 74e07b9e48
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85136
8 changed files with 102 additions and 10 deletions

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

21
etc/rc
View File

@ -406,9 +406,24 @@ esac
# Mount NFS filesystems if present in /etc/fstab
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
echo -n 'Mounting NFS file systems:'
mount -a -t nfs
echo '.'
# Handle absent nfs client support
nfsclient_in_kernel=0
if sysctl vfs.nfs >/dev/null 2>&1; then
nfsclient_in_kernel=1
else
kldload nfsclient && nfsclient_in_kernel=1
fi
case ${nfsclient_in_kernel} in
1)
echo -n 'Mounting NFS file systems:'
mount -a -t nfs
echo '.'
;;
*)
echo 'Warning: nfs mount requested, but no nfs client in kernel'
;;
esac
;;
esac

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)

View File

@ -605,7 +605,16 @@ network_pass3() {
[Yy][Ee][Ss])
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
# Handle absent nfs server support
nfsserver_in_kernel=0
if sysctl vfs.nfsrv >/dev/null 2>&1; then
nfsserver_in_kernel=1
else
kldload nfsserver && nfsserver_in_kernel=1
fi
if [ -r /etc/exports -a \
${nfsserver_in_kernel} -eq 1 ]; then
echo -n ' mountd'
case ${weak_mountd_authentication} in
@ -636,6 +645,8 @@ network_pass3() {
echo -n ' rpc.statd'; rpc.statd
;;
esac
else
echo -n ' Warning: nfs server failed'
fi
;;
*)