Bruce Dubbs wrote:
> DJ,
> I was working with David Rosal today on a problem with the nfs-server
> script during shutown. I solved it by changing the script to call kill
> directly. See the thread starting with:
>
> http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2005-October/011757.html
>
<Snip>
Sorry for my tardy reply everyone. I have webmail, but was too busy (ok
engulfed and lazy) to check it. :-) Only one minor (IMO, MozAB is minor)
problem left, but OOo-2.0 should be hot as soon as it's finally
released, if it hasn't been already yet. I've not checked today. RC3
is running great, but the build time is...argh.
Anyway, for the NFS script problem. I've not used NFS in quite some
time, so should probably test it out anyway to refamiliarize myself.
Assuming 10 seconds to kill each process, is there some reason we can't
set KILLDELAY=10 when stoping nfsd? It won't wait 10 seconds if it's
not necessary.
Here is the relevent section
# nfsd needs HUP....
TEMPSTOPSIG="${STOPSIG}"
STOPSIG="HUP"
# and needs quite some time to stop each child process
TEMPKILLDELAY="${KILLDELAY}"
KILLDELAY="10"
## Special case for nfsd with no full path
killproc nfsd
# Return the environment for stoping other processes
STOPSIG="${TEMPSTOPSIG}"
unset TEMPSTOPSIG
KILLDELAY="${TEMPKILLDELAY}"
unset TEMPKILLDELAY
Or in diff-look if it's easier (I prefer this view very much now):
# nfsd needs HUP....
- TEMPSTOPSIG="$STOPSIG"
+ TEMPSTOPSIG="${STOPSIG}"
STOPSIG="HUP"
+ # and needs quite some time to stop each child process
+ TEMPKILLDELAY="${KILLDELAY}"
+ KILLDELAY="10"
## Special case for nfsd with no full path
killproc nfsd
- # return STOPSIG to it's orginal value...
- STOPSIG="$TEMPSTOPSIG"
+ # Return the environment for stoping other processes
+ STOPSIG="${TEMPSTOPSIG}"
+ unset TEMPSTOPSIG
+ KILLDELAY="${TEMPKILLDELAY}"
+ unset TEMPKILLDELAY
Here is what killproc does to the process (defaults to 3 seconds).
# Wait up to KILLDELAY (3) seconds, for ${pid} to terminate
local dtime=${KILLDELAY}
while [ "${dtime}" != "0" ]
do
kill -0 ${pid} 2>/dev/null || break
sleep 1
dtime=$(( ${dtime} - 1))
done
HTH. If not, I should have mail imported on the other system
tomorrow...after thunderbird completes, and can move on to try this out.
-- DJ Lucas
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page