Wednesday, June 08, 2022

Re: [PATCH] infrastructure/templates/rc.template - replace rcexec variable with rc_exec function + add daemon_execdir

On 6/8/22 05:14, Raf Czlonka wrote:
> Hello,
>
> Given the recent changes[0][1], the template should probably be updated.
>
> [0] https://marc.info/?l=openbsd-cvs&m=165313015803498&w=2
> [1] https://marc.info/?l=openbsd-cvs&m=165356436530341&w=2
>
> I'm not subscribed to this mailing list so please CC me if need be.
>
> Regards,
>
> Raf
>
> Index: infrastructure/templates/rc.template
> ===================================================================
> RCS file: /cvs/ports/infrastructure/templates/rc.template,v
> retrieving revision 1.14
> diff -u -p -r1.14 rc.template
> --- infrastructure/templates/rc.template 6 Mar 2022 20:10:00 -0000 1.14
> +++ infrastructure/templates/rc.template 8 Jun 2022 09:07:38 -0000
> @@ -6,6 +6,7 @@ See rc.subr(8) for more information.
> #!/bin/ksh
>
> daemon="${TRUEPREFIX}/bin/foobar"
> +#daemon_execdir=
> #daemon_flags=
> #daemon_logger=
> #daemon_rtable=0
> @@ -23,7 +24,7 @@ daemon="${TRUEPREFIX}/bin/foobar"
> #}
>
> #rc_start() {
> -# ${rcexec} "${daemon_logger:+set -o pipefail; }${daemon} ${daemon_flags}${daemon_logger:+ 2>&1 |
> +# rc_exec "${daemon_logger:+set -o pipefail; }${daemon} ${daemon_flags}${daemon_logger:+ 2>&1 |
> # logger -ip ${daemon_logger} -t ${_name}}"
> #}
>
Don't need daemon_logger part in rc_start now, should be only

rc_start() {
    rc_exec "${daemon} ${daemon_flags}"
}

No comments:

Post a Comment