package/iputils: enable systemd services
PATCH 1/1 package/iputils: enable systemd services
These are normally enabled by systemctl preset-all.
--- package/iputils/iputils.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
package/iputils/iputils.mk +21 -0
@@ -47,11 +47,21 @@ 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_CONF_OPTS += -DBUILD_NINFOD=false +IPUTILS_NO_NINFOD = y +endif + +ifneq ($(IPUTILS_NO_NINFOD),y) +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 +113,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 1/1 package/iputils: enable systemd services
Hi James,
Quoted 3 lines
These are normally enabled by systemctl preset-all.
Signed-off-by James Hilliard <[email protected]>
Thanks!
BTW it'd be nice to buildroot has some helper to create symlink (IPUTILS_INSTALL_SERVICE_NINFOD, IPUTILS_INSTALL_SERVICE_RDISC), you're using it in several patches.
Quoted 18 lines
--- package/iputils/iputils.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)package/iputils/iputils.mk +1
-0@@ -47,11 +47,21 @@ 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_CONF_OPTS += -DBUILD_NINFOD=false
package/iputils/iputils.mk else · line 65
Quoted 10 lines
package/iputils/iputils.mk +9
-0+IPUTILS_NO_NINFOD = y +endif + +ifneq ($(IPUTILS_NO_NINFOD),y) +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
Maybe simplify IPUTILS_CONF_OPTS (diff to your patch)?
+++ package/iputils/iputils.mk
@@ -46,17 +46,17 @@ 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_CONF_OPTS += -DBUILD_NINFOD=false 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 \
Kind regards,
Petr
PATCH 1/1 package/iputils: enable systemd services
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Petr" == Petr Vorel <[email protected]> writes:
Hi,
Quoted 13 lines
Maybe simplify
IPUTILS_CONF_OPTS(diff to your patch)?+++
package/iputils/iputils.mk(quoted diff) +0
-1@@ -46,17 +46,17 @@ 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)
Review IPUTILS_DEPENDENCIES += linux-headers · line 62
Quoted 10 lines
(quoted diff) +2
-1-IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false 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 \
This doesn't make sense. With this you diable ninfod (by passing BUILD_NINFOD=false) AND install the service file.
Signature · 1 line
Bye, Peter Korsgaard