> Date: Thu, 28 Jul 2011 10:16:00 +0200
> From: David Coppa <[email protected]>
>
> On Thu, 28 Jul 2011, Robert Nagy wrote:
>
> > It seems that SIGTERM is not enough for mountd, according to the code
> > SIGTERM only sends a RPCMNT_UMNTALL broadcast to the clients.
> > So I think what we should do in this case is to first send a SIGTERM to
> > mountd,
> > and then SIGKILL it in rc_stop().
>
> Something like this? the sleep is just paranoia, don't know if it's useful...
Well, that sleep makes some sense at least; you want to give the
daemon some time to clean up. The question is whether a single second
is enough for that...
> Index: mountd
> ===================================================================
> RCS file: /cvs/src/etc/rc.d/mountd,v
> retrieving revision 1.1
> diff -u -p -r1.1 mountd
> --- mountd 8 Jul 2011 00:54:04 -0000 1.1
> +++ mountd 28 Jul 2011 08:15:37 -0000
> @@ -6,4 +6,10 @@ daemon="/sbin/mountd"
>
> . /etc/rc.d/rc.subr
>
> +rc_stop() {
> + pkill -f "^${pexp}"
> + sleep 1
> + pkill -9 -f "^${pexp}"
> +}
> +
> rc_cmd $1