diff options
author | neilbrown <neilbrown> | 2004-08-31 06:21:31 +0000 |
---|---|---|
committer | neilbrown <neilbrown> | 2004-08-31 06:21:31 +0000 |
commit | 43a26e8e4675e32d38a652f6f13e96d6b897cfab (patch) | |
tree | b66d7ed38964408351e94f6a44005ff25f54337f /etc | |
parent | 74ca5e89cdd02a583861a4c353bcac4f712878a3 (diff) | |
download | nfs-utils-43a26e8e4675e32d38a652f6f13e96d6b897cfab.tar.gz nfs-utils-43a26e8e4675e32d38a652f6f13e96d6b897cfab.tar.xz nfs-utils-43a26e8e4675e32d38a652f6f13e96d6b897cfab.zip |
mount nfsd filesystem at startup, and unmount afterwards
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/nodist/nfs-server | 6 | ||||
-rw-r--r-- | etc/redhat/nfs | 3 | ||||
-rwxr-xr-x | etc/redhat/nfs.init | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/etc/nodist/nfs-server b/etc/nodist/nfs-server index 8f1d34b..f164884 100755 --- a/etc/nodist/nfs-server +++ b/etc/nodist/nfs-server @@ -46,6 +46,10 @@ DESC="NFS kernel daemon" # Handle how we were called. case "$1" in start) + if [ -d /proc/fs/nfsd -a ! -f /proc/fs/nfsd/exports ] ; + then + /bin/mount -t nfsd nfsd /proc/fs/nfsd + fi echo -n "Exporting directories for $DESC..." $EXPORTFS -r echo "done." @@ -97,12 +101,14 @@ stop) echo "Unexporting directories for $DESC..." $EXPORTFS -au + if [ -f /proc/fs/nfsd/exports ] ; then /bin/umount -t nfsd nfsd /proc/fs/nfsd ; fi rm -f /var/lock/subsys/$SCRIPT_NAME echo "done." ;; restart) $0 stop + sleep 1 $0 start ;; diff --git a/etc/redhat/nfs b/etc/redhat/nfs index 5e21f1f..2ace4cd 100644 --- a/etc/redhat/nfs +++ b/etc/redhat/nfs @@ -29,3 +29,6 @@ # TUNE_QUEUE to yes will set the values to 256kb. # TUNE_QUEUE="yes" # NFS_QS=262144 + +# Mount /proc/fs/nfsd (2.6 kernel only) +MOUNT_NFSD="yes" diff --git a/etc/redhat/nfs.init b/etc/redhat/nfs.init index ac45937..1ac4213 100755 --- a/etc/redhat/nfs.init +++ b/etc/redhat/nfs.init @@ -50,9 +50,13 @@ if [ "$TUNE_QUEUE" = "yes" ]; then [ -z "$NFS_QS" ] && NFS_QS=262144 fi + # See how we were called. case "$1" in start) + if [ -d /proc/fs/nfsd -a "$MOUNT_NFSD" = "yes" ] ; then + /bin/mount -t nfsd nfsd /proc/fs/nfsd + fi # Start daemons. # Apply input queue increase for nfs server if [ "$TUNE_QUEUE" = "yes" ]; then @@ -144,6 +148,9 @@ case "$1" in # Do it the last so that clients can still access the server # when the server is running. action "Shutting down NFS services: " /usr/sbin/exportfs -au + if [ -d /proc/fs/nfsd -a "$MOUNT_NFSD" = "yes" ] ; then + /bin/umount /proc/fs/nfsd + fi rm -f /var/lock/subsys/nfs ;; status) |