Omar Polo <[email protected]> wrote:
> Would you be fine with updating this on -STABLE too?  It's almost the
> same but merges also the changes to prosody.rc from aja@.
> 
> Thanks,
> 
> Omar Polo

I'm fine with the changes. I think I kept it in the past because
rc.subr(8) states that "[rc_cmd check] call rc_check. Return 0 if the
daemon is running and 1 if it is not." I'm p sure I checked why it was
forcefully returning 1 on failure in the past, and that text is what
made me say "oh, it's like it should be." In reality, `rc_cmd` is in
charge of exiting with 0 or 1 depending on the result of `rc_check`.
Maybe that paragraph could be reworked a bit to avoid further
confussions? I think I've seen the `|| return 1` in other places, but
I don't have any idea other than saying replacing it with

    call rc_check. Return 0 if the daemon is running and non-zero if it
    is not.

which is technically, but not as specific as the former.

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/prosody/Makefile,v
> retrieving revision 1.68
> diff -u -p -r1.68 Makefile
> --- Makefile  1 Apr 2022 14:47:53 -0000       1.68
> +++ Makefile  12 Jun 2022 08:59:39 -0000
> @@ -1,5 +1,5 @@
>  COMMENT =    communications server for Jabber/XMPP written in Lua
> -DISTNAME =   prosody-0.12.0
> +DISTNAME =   prosody-0.12.1
>  CATEGORIES = net
>  HOMEPAGE =   https://prosody.im/
>  
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/net/prosody/distinfo,v
> retrieving revision 1.25
> diff -u -p -r1.25 distinfo
> --- distinfo  1 Apr 2022 14:47:53 -0000       1.25
> +++ distinfo  12 Jun 2022 08:59:39 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (prosody-0.12.0.tar.gz) = dS/zIBXaxWX8NBfCGWryaJccNY7gZuUfXZEkE1gNiJo=
> -SIZE (prosody-0.12.0.tar.gz) = 610330
> +SHA256 (prosody-0.12.1.tar.gz) = p+y75B8BpCUYBVk6xtFdvGy3XZx6h2x2tFbPdP9LkOU=
> +SIZE (prosody-0.12.1.tar.gz) = 611898
> Index: pkg/prosody.rc
> ===================================================================
> RCS file: /cvs/ports/net/prosody/pkg/prosody.rc,v
> retrieving revision 1.6
> diff -u -p -r1.6 prosody.rc
> --- pkg/prosody.rc    11 Mar 2022 19:46:58 -0000      1.6
> +++ pkg/prosody.rc    12 Jun 2022 08:59:39 -0000
> @@ -10,8 +10,7 @@ pexp="${MODLUA_BIN} ${daemon}${daemon_fl
>  rc_usercheck=NO
>  
>  rc_check() {
> -     # return 1 is needed: prosodyctl returns a higher error code on failure
> -     ${TRUEPREFIX}/sbin/prosodyctl status || return 1
> +     ${TRUEPREFIX}/sbin/prosodyctl status
>  }
>  
>  rc_cmd $1


Reply via email to