busybox: Don't overwrite existing inittab
PATCH 1/1 busybox: Don't overwrite existing inittab
If a inittab file was already provided in the skeleton, don't overwrite it with the one that comes with the busybox package.
--- package/busybox/busybox.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/busybox/busybox.mk +3 -1
@@ -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 ! -r $(TARGET_DIR)/etc/inittab; then \ + $(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab; \ + fi endef endif
Signature · 1 line
2.24.0
PATCH 1/1 busybox: Don't overwrite existing inittab
Quoted 13 lines · On Fri, 6 Dec 2019 13:31:54 +0100 Paul Cercueil <[email protected]> wrote:
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 <[email protected]>--- package/busybox/busybox.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)package/busybox/busybox.mk +0
-0
package/busybox/busybox.mk endif · line 280
Quoted 5 lines
package/busybox/busybox.mk +1
-1@@ -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 ! -r $(TARGET_DIR)/etc/inittab; then \
We more commonly use test -e and not test -r for this kind of tests, so I've changed to use test -e, and applied to master. Thanks!
Note that we normally recommend to override such files using a rootfs overlay instead of a skeleton, as a rootfs overlay always wins over whatever Buildroot packages might do.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 busybox: Don't overwrite existing inittab
In reply to Paul CercueilQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Paul" == Paul Cercueil <[email protected]> writes:
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 <[email protected]>
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard