lkml.org 
[lkml]   [1999]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: knfsd 1.2.2 is released [script for SuSE 5]
Find enclosed the /etc/rc.d/nfsserver script for SuSE 5.2. It starts the
rpc.knfsd and related daemons.

This is just an example for people asking for knfsd in last threads.

The script is ugly, it's just a very fast copy-paste of the SysV
scripts into original SuSE script. I did not clean it, because it works
now and it's easy to make a typo.... If you clean it, send me a copy once
you tested it ;-)



Check the filenames,

/usr/sbin/kexportfs
/usr/sbin/rpc.knfs
/usr/sbin/rpc.kmountd
/usr/sbin/rpc.kstatd

You should copy the daemons from HJL knfsd 1.2.1, 1.2.2 with these names.
They are self explanatory.

Also check you create (touch) the following file:

/var/lib/nfs/xtab

otherwise the daemons won't start (yes, add it to the script...).

Do not forget to do a depmode before restarting the machine.

Best regards,


--
Ricardo Galli



#! /bin/sh
# Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany. All rights reserved.
#
# Author: Florian La Roche <florian@suse.de>, 1996
# Werner Fink <werner@suse.de>, 1996
# Burchard Steinbild <bs@suse.de>, 1997
#
# /sbin/init.d/nfsserver
#
# Modified by R. Galli (gallir@atlas-iap.es), Apr. 1999
# Start knfsd if files exist.
# It's completely ugly, nasty and unreadable
# But it works, and in three minutes you can clean it.


. /etc/rc.config

test "$START_PORTMAP" = no -a "$NFS_SERVER" = no && exit 0

if [ -f /usr/sbin/rpc.knfsd -a -f /usr/sbin/rpc.kmountd -a -f /usr/sbin/rpc.kstatd -a -f /usr/sbin/kexportfs ]; then
KNFSD=yes
else
KNFSD=no
fi

if [ $KNFSD = yes ]; then
RPCNFSD=rpc.knfsd
NFSD=nfsd
LOCKD=lockd
RPCNFSDCOUNT=2
# No NFS V3.
RPCMOUNTD_OPTS="--no-nfs-version 3"
RPCMOUNTD=rpc.kmountd
RPCSTATD=rpc.kstatd
KSTOPSIGNAL=-9
else
[ -f /usr/sbin/rpc.nfsd ] || exit 0
[ -f /usr/sbin/rpc.mountd ] || exit 0
[ -f /usr/sbin/exportfs ] || exit 0
RPCNFSD=rpc.nfsd
RPCMOUNTD=rpc.mountd
fi



case "$1" in
start)
if test "$NFS_SERVER" = yes; then
echo "Starting NFS server."

# Make sure /var/lib/nfs/rmtab exist.
if [ ! -f /var/lib/nfs/rmtab ]; then
touch /var/lib/nfs/rmtab
if [ $? != 0 ]; then
echo "$0: Failed to create /var/lib/nfs/rmtab."
exit 1;
fi
chmod 644 /var/lib/nfs/rmtab
fi
# Start daemons.
if [ $KNFSD = yes ]; then
echo "Starting KNFS."
$RPCSTATD
/usr/sbin/kexportfs -r
$RPCMOUNTD $RPCMOUNTD_OPTS
$RPCNFSD $RPCNFSDCOUNT
echo
touch /var/lock/subsys/nfs
else

PARAMS=""
test "$REEXPORT_NFS" = yes && PARAMS="--re-export"
test -x /usr/sbin/rpc.mountd && /usr/sbin/rpc.mountd $PARAMS
test -x /usr/sbin/rpc.nfsd && /usr/sbin/rpc.nfsd $PARAMS
if test "$NFS_SERVER_UGID" = yes; then
test -x /usr/sbin/rpc.ugidd && /usr/sbin/rpc.ugidd
fi
fi
fi
;;
stop)
if test "$NFS_SERVER" = yes; then
echo -n "Shutting down NFS server:"
if [ $KNFSD = yes ]; then
/usr/sbin/kexportfs -au
killproc -TERM /usr/sbin/rpc.kmountd
killproc -TERM /usr/sbin/rpc.kstatd
rm -f /var/lock/subsys/nfs
else

killproc -TERM /usr/sbin/rpc.mountd
killproc -TERM /usr/sbin/rpc.nfsd
killproc -TERM /usr/sbin/rpc.ugidd
echo
fi
fi
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.019 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site