Date: 29 Jul 2000 14:24:49 +0200 From: Dag-Erling Smorgrav <des@flood.ping.uio.no> To: Peter Wemm <peter@netplex.com.au> Cc: Eivind Eklund <eivind@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc/defaults rc.conf src/release/sysinstall config.c Message-ID: <xzpk8e5dsz2.fsf@flood.ping.uio.no> In-Reply-To: Dag-Erling Smorgrav's message of "29 Jul 2000 14:04:40 %2B0200" References: <200007290035.RAA50659@netplex.com.au> <xzpu2d9dtwn.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Dag-Erling Smorgrav <des@flood.ping.uio.no> writes:
> Might be an idea to hack rc.network to always run portmap if NIS
> and/or NFS is enabled.
Something like the attached patch maybe? I haven't tested it very
thoroughly, so the usual disclaimers apply.
--=-=-=
Content-Disposition: attachment; filename=diff
Content-Description: patch
Index: rc.network
===================================================================
RCS file: /home/ncvs/src/etc/rc.network,v
retrieving revision 1.81
diff -u -r1.81 rc.network
--- rc.network 2000/07/14 13:03:36 1.81
+++ rc.network 2000/07/29 12:23:42
@@ -414,6 +414,25 @@
network_pass1_done=YES
}
+start_portmap() {
+ case ${portmap_enable} in
+ [Yy][Ee][Ss])
+ echo -n ' portmap'; ${portmap_program:-/usr/sbin/portmap} ${portmap_flags}
+ ;;
+ esac
+}
+
+require_portmap() {
+ case ${portmap_enable} in
+ [Yy][Ee][Ss])
+ ;;
+ *)
+ portmap_enable="YES"
+ start_portmap
+ ;;
+ esac
+}
+
network_pass2() {
echo -n 'Doing additional network setup:'
case ${named_enable} in
@@ -441,17 +460,14 @@
;;
esac
- case ${portmap_enable} in
- [Yy][Ee][Ss])
- echo -n ' portmap'; ${portmap_program:-/usr/sbin/portmap} ${portmap_flags}
- ;;
- esac
+ start_portmap
# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
#
case ${nis_server_enable} in
[Yy][Ee][Ss])
+ require_portmap
echo -n ' ypserv'; ypserv ${nis_server_flags}
case ${nis_ypxfrd_enable} in
@@ -474,6 +490,7 @@
#
case ${nis_client_enable} in
[Yy][Ee][Ss])
+ require_portmap
echo -n ' ypbind'; ypbind ${nis_client_flags}
case ${nis_ypset_enable} in
[Yy][Ee][Ss])
@@ -487,6 +504,7 @@
#
case ${keyserv_enable} in
[Yy][Ee][Ss])
+ require_portmap
echo -n ' keyserv'; keyserv ${keyserv_flags}
;;
esac
@@ -495,6 +513,7 @@
#
case ${rpc_ypupdated_enable} in
[Yy][Ee][Ss])
+ require_portmap
echo -n ' rpc.ypupdated'; rpc.ypupdated
;;
esac
@@ -514,6 +533,7 @@
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
+ require_portmap
echo -n ' mountd'
case ${weak_mountd_authentication} in
@@ -555,6 +575,7 @@
case ${single_mountd_enable} in
[Yy][Ee][Ss])
if [ -r /etc/exports ]; then
+ require_portmap
echo -n ' mountd'
case ${weak_mountd_authentication} in
@@ -572,6 +593,7 @@
case ${nfs_client_enable} in
[Yy][Ee][Ss])
+ require_portmap
echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ -n "${nfs_access_cache}" ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
@@ -585,6 +607,7 @@
# sucessfully notified about a previous client shutdown.
# If there is no /var/db/mounttab, we do nothing.
if [ -f /var/db/mounttab ]; then
+ require_portmap
rpc.umntall -k
fi
--=-=-=
Also, I wasn't sure just which services requires portmap and which
ones don't, so I added require_portmap to everything remotely related
to NIS, NFS and RPC.
DES
--
Dag-Erling Smorgrav - des@flood.ping.uio.no
--=-=-=--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpk8e5dsz2.fsf>
