# If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
define BUSYBOX_INSTALL_MDEV_SCRIPT
- [ -f $(TARGET_DIR)/etc/init.d/S10mdev ] || \
- $(INSTALL) -D -m 0755 package/busybox/S10mdev \
- $(TARGET_DIR)/etc/init.d/S10mdev
+ $(INSTALL) -D -m 0755 package/busybox/S10mdev \
+ $(TARGET_DIR)/etc/init.d/S10mdev
endef
define BUSYBOX_INSTALL_MDEV_CONF
- [ -f $(TARGET_DIR)/etc/mdev.conf ] || \
- $(INSTALL) -D -m 0644 package/busybox/mdev.conf \
- $(TARGET_DIR)/etc/mdev.conf
+ $(INSTALL) -D -m 0644 package/busybox/mdev.conf \
+ $(TARGET_DIR)/etc/mdev.conf
endef
define BUSYBOX_SET_MDEV
$(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG))
define BUSYBOX_INSTALL_LOGGING_SCRIPT
if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
- [ -f $(TARGET_DIR)/etc/init.d/S01logging ] || \
- $(INSTALL) -m 0755 -D package/busybox/S01logging \
- $(TARGET_DIR)/etc/init.d/S01logging; \
+ $(INSTALL) -m 0755 -D package/busybox/S01logging \
+ $(TARGET_DIR)/etc/init.d/S01logging; \
else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
endef
$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
endef
define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
- [ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \
- $(INSTALL) -D -m 0755 package/busybox/S15watchdog \
- $(TARGET_DIR)/etc/init.d/S15watchdog && \
- $(SED) s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \
- $(TARGET_DIR)/etc/init.d/S15watchdog
+ $(INSTALL) -D -m 0755 package/busybox/S15watchdog \
+ $(TARGET_DIR)/etc/init.d/S15watchdog
+ $(SED) s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \
+ $(TARGET_DIR)/etc/init.d/S15watchdog
endef
endif
define BUSYBOX_INSTALL_TARGET_CMDS
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
- if [ ! -f $(TARGET_DIR)/usr/share/udhcpc/default.script ]; then \
- $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
- $(TARGET_DIR)/usr/share/udhcpc/default.script; \
- fi
+ $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
+ $(TARGET_DIR)/usr/share/udhcpc/default.script
$(BUSYBOX_INSTALL_MDEV_CONF)
endef