From cda43ef61261c80d5b81b0575cde270e227b5ffb Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Sun, 15 Nov 1998 20:30:04 +0000 Subject: [PATCH] Implement the nfs_access_cache variable, allowing us to set the timeout for the NFS client's ACCESS cache. --- etc/network.subr | 5 ++++- etc/rc.conf | 3 ++- etc/rc.d/netoptions | 5 ++++- etc/rc.d/network1 | 5 ++++- etc/rc.d/network2 | 5 ++++- etc/rc.d/network3 | 5 ++++- etc/rc.d/routing | 5 ++++- etc/rc.network | 5 ++++- 8 files changed, 30 insertions(+), 8 deletions(-) diff --git a/etc/network.subr b/etc/network.subr index 30efc0d8fb2c..12654f558768 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.conf b/etc/rc.conf index e3050654beda..9641458ba732 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -6,7 +6,7 @@ # # All arguments must be in double or single quotes. # -# $Id: rc.conf,v 1.60 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.conf,v 1.61 1998/10/08 18:47:29 des Exp $ ############################################################## ### Important initial Boot-time options ##################### @@ -58,6 +58,7 @@ amd_flags="-a /net -c 1800 -k i386 -d my.domain -l syslog /host /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_client_flags="-n 4" # Flags to nfsiod (if enabled). +nfs_access_cache="2" # Client cache timeout in seconds or NO nfs_server_enable="NO" # This host is an NFS server (or NO). nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled). mountd_flags="-r" # Flags to mountd (if NFS server enabled). diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then diff --git a/etc/rc.network b/etc/rc.network index 30efc0d8fb2c..12654f558768 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.33 1998/10/06 19:24:14 phk Exp $ +# $Id: rc.network,v 1.34 1998/11/11 05:23:44 peter Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -258,6 +258,9 @@ network_pass3() { if [ "X${nfs_client_enable}" = X"YES" ]; then echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ ! "X${nfs_access_cache}" = X ]; then + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} + fi fi if [ "X${amd_enable}" = X"YES" ]; then