aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1999-11-14 21:28:13 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1999-11-14 21:28:13 +0000
commit319f15a2621db3ccacbac86367ec5bef943dea59 (patch)
tree7b07a9167443c18200a6377447aad91719fd0ef4
parent328984c261d05b0379b6215dc964c0c5bae95d23 (diff)
downloadsrc-319f15a2621db3ccacbac86367ec5bef943dea59.tar.gz
src-319f15a2621db3ccacbac86367ec5bef943dea59.zip
Add single_mountd_enable hook to run mountd but not NFS server
Needed for machine with CFS but without real NFS
Notes
Notes: svn path=/head/; revision=53158
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/network.subr17
-rw-r--r--etc/rc.d/netoptions17
-rw-r--r--etc/rc.d/network117
-rw-r--r--etc/rc.d/network217
-rw-r--r--etc/rc.d/network317
-rw-r--r--etc/rc.d/routing17
-rw-r--r--etc/rc.network17
8 files changed, 120 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 35b220e759ae..1d82358c26b3 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -99,6 +99,7 @@ nfs_client_flags="-n 4" # Flags to nfsiod (if enabled).
nfs_access_cache="2" # Client cache timeout in seconds
nfs_server_enable="NO" # This host is an NFS server (or NO).
nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled).
+single_mountd_enable="NO" # Run mountd only (or NO).
mountd_flags="-r" # Flags to mountd (if NFS server enabled).
nfs_reserved_port_only="NO" # Provide NFS only on secure port (or NO).
rpc_lockd_enable="NO" # Run NFS rpc.lockd (*broken!*) if nfs_server.
diff --git a/etc/network.subr b/etc/network.subr
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in
diff --git a/etc/rc.network b/etc/rc.network
index ad6633779677..d17f6ef7ea92 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -508,6 +508,23 @@ network_pass3() {
esac
fi
;;
+ *)
+ case ${single_mountd_enable} in
+ [Yy][Ee][Ss])
+ if [ -r /etc/exports ]; then
+ echo -n ' mountd'
+
+ case ${weak_mountd_authentication} in
+ [Yy][Ee][Ss])
+ mountd_flags="-n"
+ ;;
+ esac
+
+ mountd ${mountd_flags}
+ fi
+ ;;
+ esac
+ ;;
esac
case ${nfs_client_enable} in