busybox: don't install NTP scripts if NTP isn't configured
[openwrt/openwrt.git] / package / utils / busybox / Makefile
index 40bddd6b58195828951d1e48c12848f4fbfc1430..6463dc0184f1f857c27edfa26ffdd5b70d0bfe23 100644 (file)
@@ -118,9 +118,13 @@ endef
 define Package/busybox/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+ifneq ($(CONFIG_BUSYBOX_CONFIG_CROND),)
        $(INSTALL_BIN) ./files/cron $(1)/etc/init.d/cron
+endif
+ifneq ($(CONFIG_BUSYBOX_CONFIG_NTPD),)
        $(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd
        $(INSTALL_BIN) ./files/ntpd-hotplug $(1)/usr/sbin/ntpd-hotplug
+endif
        -rm -rf $(1)/lib64
 endef