package/iputils: enable systemd services
PATCH v2 1/1 package/iputils: enable systemd services
These are normally enabled by systemctl preset-all.
---
Changes v1 -> v2:
- simplify IPUTILS_CONF_OPTS
--- package/iputils/iputils.mk | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
package/iputils/iputils.mk +21 -1
@@ -46,12 +46,21 @@ IPUTILS_DEPENDENCIES += linux-headers else IPUTILS_CONF_OPTS += -DUSE_CRYPTO=none # BUILD_NINFOD=true and USE_CRYPTO=none cannot be combined -IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false +IPUTILS_NO_NINFOD = y endif # ninfod requires <pthread.h> ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +IPUTILS_NO_NINFOD = y +endif + +ifneq ($(IPUTILS_NO_NINFOD),y) IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false +define IPUTILS_INSTALL_SERVICE_NINFOD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../lib/systemd/system/ninfod.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ninfod.service +endef endif ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
@@ -103,4 +112,15 @@ define IPUTILS_PERMISSIONS endef endif +define IPUTILS_INSTALL_SERVICE_RDISC + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../lib/systemd/system/rdisc.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rdisc.service +endef + +define IPUTILS_INSTALL_INIT_SYSTEMD + $(IPUTILS_INSTALL_SERVICE_NINFOD) + $(IPUTILS_INSTALL_SERVICE_RDISC) +endef + $(eval $(meson-package))
Signature · 1 line
2.20.1
PATCH v2 1/1 package/iputils: enable systemd services
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"James" == James Hilliard <[email protected]> writes:
These are normally enabled by systemctl preset-all.
Signed-off-by James Hilliard <[email protected]>Reviewed-by Petr Vorel <[email protected]>---
Changes v1 -> v2:
- simplifyIPUTILS_CONF_OPTS--- package/iputils/iputils.mk | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)package/iputils/iputils.mk +1
-1@@ -46,12 +46,21 @@ IPUTILS_DEPENDENCIES += linux-headers else IPUTILS_CONF_OPTS += -DUSE_CRYPTO=none # BUILD_NINFOD=true and USE_CRYPTO=none cannot be combined -IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false +IPUTILS_NO_NINFOD = y endif # ninfod requires <pthread.h> ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
package/iputils/iputils.mk IPUTILS_DEPENDENCIES += linux-headers · line 63
Quoted 10 lines
package/iputils/iputils.mk +9
-0+IPUTILS_NO_NINFOD = y +endif + +ifneq ($(IPUTILS_NO_NINFOD),y) IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false +define IPUTILS_INSTALL_SERVICE_NINFOD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../lib/systemd/system/ninfod.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ninfod.service +endef
As mentioned, it doesn't make sense to disable infod and install the service file under the same conditional.
The problem is really that negative logic is confusing, so I've changed it to use positive logic (IPUTILS_NINFOD=y) and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 package/iputils: enable systemd services
Hi Peter,
Quoted 2 lines
As mentioned, it doesn't make sense to disable infod and install the service file under the same conditional.
Sorry, for missing obvious error.
Quoted 2 lines
The problem is really that negative logic is confusing, so I've changed it to use positive logic (IPUTILS_NINFOD=y) and committed, thanks.
+1. IPUTILS_NINFOD = n you did in the end is more readable.
Kind regards,
Petr