busybox: don't overwrite existing inittab
authorPaul Cercueil <paul@crapouillou.net>
Fri, 6 Dec 2019 12:31:54 +0000 (13:31 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 8 Dec 2019 15:48:36 +0000 (16:48 +0100)
If a inittab file was already provided in the skeleton, don't overwrite
it with the one that comes with the busybox package.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/busybox/busybox.mk

index 301e72bdd2f8e6d712c1a649c21d423fa0edbeaa..6283bc96ea4ead91f4ebf33c338915452a9a0ffc 100644 (file)
@@ -277,7 +277,9 @@ endif
 
 ifeq ($(BR2_INIT_BUSYBOX),y)
 define BUSYBOX_INSTALL_INITTAB
-       $(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab
+       if test ! -e $(TARGET_DIR)/etc/inittab; then \
+               $(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab; \
+       fi
 endef
 endif