On Fri, Dec 04, 2015 at 01:41:55PM +0100, Christian Weisgerber wrote:
> Require /etc/rebound.conf to exist before starting rebound.
> 
> Otherwise, if the configuration file doesn't exist, rebound will
> error out, but only after daemonizing, so the rc system won't notice
> the failure.
> 
> ok?

I did the same for httpd but was told this is not the way we should do things 
and that the daemon should return a proper error code.

> Index: rebound
> ===================================================================
> RCS file: /cvs/src/etc/rc.d/rebound,v
> retrieving revision 1.1
> diff -u -p -r1.1 rebound
> --- rebound   30 Nov 2015 23:35:30 -0000      1.1
> +++ rebound   4 Dec 2015 12:37:04 -0000
> @@ -6,4 +6,8 @@ daemon="/usr/sbin/rebound"
>  
>  . /etc/rc.d/rc.subr
>  
> +rc_pre() {
> +     [ -s /etc/rebound.conf ]
> +}
> +
>  rc_cmd $1
> -- 
> Christian "naddy" Weisgerber                          [email protected]
> 

-- 
Antoine

Reply via email to