diff mbox series

[rpcbind] autotools/systemd: call rpcbind with -w only on enabled warm starts

Message ID 20210611122803.24747-1-bst@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series [rpcbind] autotools/systemd: call rpcbind with -w only on enabled warm starts | expand

Commit Message

Bastian Krause June 11, 2021, 12:28 p.m. UTC
If rpcbind is configured with --disable-warmstarts it responds on -w
with its usage string. This is not helpful in a systemd service, so pass
-w conditionally.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 configure.ac               | 6 ++++++
 systemd/rpcbind.service.in | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Bastian Krause July 6, 2022, 10:11 a.m. UTC | #1
On 6/11/21 14:28, Bastian Krause wrote:
> If rpcbind is configured with --disable-warmstarts it responds on -w
> with its usage string. This is not helpful in a systemd service, so pass
> -w conditionally.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>

Gentle ping!

Regards,
Bastian

> ---
>   configure.ac               | 6 ++++++
>   systemd/rpcbind.service.in | 2 +-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c0ef896..c2069a2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes)
>   AC_ARG_ENABLE([warmstarts],
>     AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@]))
>   AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
> +AS_IF([test x$enable_warmstarts = xyes], [
> +	warmstarts_opt=-w
> +], [
> +	warmstarts_opt=
> +])
> +AC_SUBST([warmstarts_opt], [$warmstarts_opt])
>   
>   AC_ARG_ENABLE([rmtcalls],
>     AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@]))
> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
> index 7b1c74b..c892ca8 100644
> --- a/systemd/rpcbind.service.in
> +++ b/systemd/rpcbind.service.in
> @@ -12,7 +12,7 @@ Wants=rpcbind.target
>   [Service]
>   Type=notify
>   # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
> -ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
> +ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
>   
>   [Install]
>   WantedBy=multi-user.target
Steve Dickson July 12, 2022, 8:39 p.m. UTC | #2
On 6/11/21 7:28 AM, Bastian Krause wrote:
> If rpcbind is configured with --disable-warmstarts it responds on -w
> with its usage string. This is not helpful in a systemd service, so pass
> -w conditionally.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
This did fall of my radar... In the future feel free
to ping me privately...

Committed! (tag  rpcbind-1_2_7-rc2)

steved.
> ---
>   configure.ac               | 6 ++++++
>   systemd/rpcbind.service.in | 2 +-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c0ef896..c2069a2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes)
>   AC_ARG_ENABLE([warmstarts],
>     AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@]))
>   AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
> +AS_IF([test x$enable_warmstarts = xyes], [
> +	warmstarts_opt=-w
> +], [
> +	warmstarts_opt=
> +])
> +AC_SUBST([warmstarts_opt], [$warmstarts_opt])
>   
>   AC_ARG_ENABLE([rmtcalls],
>     AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@]))
> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
> index 7b1c74b..c892ca8 100644
> --- a/systemd/rpcbind.service.in
> +++ b/systemd/rpcbind.service.in
> @@ -12,7 +12,7 @@ Wants=rpcbind.target
>   [Service]
>   Type=notify
>   # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
> -ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
> +ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
>   
>   [Install]
>   WantedBy=multi-user.target
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index c0ef896..c2069a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,12 @@  AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes)
 AC_ARG_ENABLE([warmstarts],
   AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@]))
 AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
+AS_IF([test x$enable_warmstarts = xyes], [
+	warmstarts_opt=-w
+], [
+	warmstarts_opt=
+])
+AC_SUBST([warmstarts_opt], [$warmstarts_opt])
 
 AC_ARG_ENABLE([rmtcalls],
   AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@]))
diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
index 7b1c74b..c892ca8 100644
--- a/systemd/rpcbind.service.in
+++ b/systemd/rpcbind.service.in
@@ -12,7 +12,7 @@  Wants=rpcbind.target
 [Service]
 Type=notify
 # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
 
 [Install]
 WantedBy=multi-user.target