On 2011/04/03 18:04, Piotr Sikora wrote:
> Hello,
> attached patch adds "daemon(ok/failed)" output to the "reload" command.
> 
> I believe it's extremely useful, since daemon's stderr is suppressed
> by rc_do.

This doesn't usually indicate that the reload was successful,
just that you were able to send the process a SIGHUP. As such I think
printing "ok" here gives a false sense of security.


> Best regards,
> Piotr Sikora < piotr.sik...@frickle.com >
> Index: rc.subr
> ===================================================================
> RCS file: /cvs/src/etc/rc.d/rc.subr,v
> retrieving revision 1.33
> diff -u -r1.33 rc.subr
> --- rc.subr   6 Apr 2011 06:09:28 -0000       1.33
> +++ rc.subr   6 Apr 2011 11:38:57 -0000
> @@ -89,7 +89,8 @@
>               fi
>               ;;
>       reload)
> -             rc_do rc_check && rc_do rc_reload
> +             rc_do rc_check && \
> +                     ( rc_do rc_reload && rc_print ok || rc_print failed )
>               ;;
>       restart)
>               /etc/rc.d/${_name} stop && /etc/rc.d/${_name} start

Reply via email to