# 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
- install -m 0755 package/busybox/S10mdev $(TARGET_DIR)/etc/init.d
+ [ -f $(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 ] || \
define BUSYBOX_INSTALL_LOGGING_SCRIPT
if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
- $(INSTALL) -m 0755 -D package/busybox/S01logging \
- $(TARGET_DIR)/etc/init.d/S01logging; \
+ [ -f $(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