On Thu, 28 Jul 2011, David Coppa wrote:

> 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...

Why not use rc_post for SIGKILL?

> 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
> 
> 

-- 
Antoine

Reply via email to