Bruce Dubbs wrote: > DJ Lucas wrote: > > >>Okay...my previous suggestion absolutely sucked using killdelay. Thanks >>for the 70 second warning Bruce. BTW, HUP seems odd to me, but I'll >>know about that in a short time. I just can't help but think that >>Nathan I talked about that script at one time or another, but can't find >>anything on it. Anyway, if that works as expected, then it works, just >>need to handle the unconditional 10 second wait. I don't have a good >>solution for it though, so it may be the only safe way. Only thing I >>can think of is that maybe a test (kill -0) against the lowest numbered >>(parent?) process is sufficient, but I'm not there yet. > > > When we start rpc.nfsd, we start 8 processes in the init script. > Actually, this really starts the process in the kernel as that is where > nfsd really runs. The only way to communicate is via signals. I don't > see there a kill -0 would do anything. > > I did try killing the lowest numbered nfsd process, but it only killed > that one process. The others continued to run. > > - -Bruce
Why not use 'rpc.nfsd -- 0'? This tells the kernel [nfsd] threads to cease and desist - well it actually says to kernel that you want zero of them. This is what I use (under runit), and it works reliably: Run: ------------------------------------ #!/bin/bash exec 2>&1 # Make sure the statd daemon is up # (the statd service must ensure portmap is running first) svwaitup /var/service/statd # Get the nfs service parameters from the LFS standard file source /etc/sysconfig/nfs-server # Re-export all directories in /etc/exports /usr/sbin/exportfs -ra > /dev/null # start some nfsd threads /usr/sbin/rpc.nfsd -p $PORT $PROCESSES # since we are running kernel 2.6 we should also # mount the nfsd virtual filesystem /bin/mount -t nfsd none /proc/fs/nfsd > /dev/null # Start the rpc.mountd daemon exec /usr/sbin/rpc.mountd --foreground ---------------------------------------- Finish: ----------------------------------------- #!/bin/sh exec 2>&1 # shut down the nfsd threads and lockd. rpc.nfsd -- 0 /bin/umount /proc/fs/nfsd 2>&1 > /dev/null -------------------------------------------- Richard. -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
