package/busybox: install example zcip.script when zcip is enabled
authorSven Oliver Moll <buildroot@svol.li>
Wed, 21 Oct 2020 10:33:43 +0000 (12:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 25 Oct 2020 08:50:28 +0000 (09:50 +0100)
this way zcip will work out of the box when configured

Signed-off-by: Sven Oliver Moll <buildroot@svol.li>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/busybox/busybox.mk

index 01f7331221b8e0c5c33a4d1ed527d5cbe393f180..76ab30780cca69893531af0bda4a548e16c09097 100644 (file)
@@ -208,6 +208,13 @@ define BUSYBOX_INSTALL_UDHCPC_SCRIPT
        fi
 endef
 
+define BUSYBOX_INSTALL_ZCIP_SCRIPT
+       if grep -q CONFIG_ZCIP=y $(@D)/.config; then \
+               $(INSTALL) -m 0755 -D $(@D)/examples/zcip.script \
+                       $(TARGET_DIR)/usr/share/zcip/default.script; \
+       fi
+endef
+
 ifeq ($(BR2_INIT_BUSYBOX),y)
 
 define BUSYBOX_SET_INIT
@@ -366,6 +373,7 @@ define BUSYBOX_INSTALL_TARGET_CMDS
        $(BUSYBOX_INSTALL_INDIVIDUAL_BINARIES)
        $(BUSYBOX_INSTALL_INITTAB)
        $(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
+       $(BUSYBOX_INSTALL_ZCIP_SCRIPT)
        $(BUSYBOX_INSTALL_MDEV_CONF)
 endef