Skip to contentSkip to conversation

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

PATCH In review Bastian Krause 2 participants 3 messages Jun 11, 2021 – Jul 12, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autotools/systemd: call rpcbind with -w only on enabled warm starts

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.

---
 configure.ac               | 6 ++++++
 systemd/rpcbind.service.in | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
configure.ac +6 -0
index c0ef896..c2069a2 100644
@@ -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@:>@]))
systemd/rpcbind.service.in +1 -1
index 7b1c74b..c892ca8 100644
@@ -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
Signature · 1 line
2.29.2
#1 lore raw
Quoted 5 lines · Bastian Krause

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.

Gentle ping!

Regards,
Bastian

Quoted 35 lines
---
  configure.ac               | 6 ++++++
  systemd/rpcbind.service.in | 2 +-
  2 files changed, 7 insertions(+), 1 deletion(-)
configure.ac +6 -0
index c0ef896..c2069a2 100644
@@ -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@:>@]))
systemd/rpcbind.service.in +1 -1
index 7b1c74b..c892ca8 100644
@@ -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
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw
In reply to Bastian Krause
Quoted 5 lines · Bastian Krause

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.

This did fall of my radar... In the future feel free to ping me privately...

Committed! (tag rpcbind-1_2_7-rc2)

steved.

Quoted 35 lines
---
  configure.ac               | 6 ++++++
  systemd/rpcbind.service.in | 2 +-
  2 files changed, 7 insertions(+), 1 deletion(-)
configure.ac +6 -0
index c0ef896..c2069a2 100644
@@ -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@:>@]))
systemd/rpcbind.service.in +1 -1
index 7b1c74b..c892ca8 100644
@@ -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