Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package: Fix overwrite inittab w/ default skeleton
@ 2015-07-16 16:30 Maxime Hadjinlian
  2015-07-16 16:38 ` Gustavo Zacarias
  2015-07-16 21:07 ` Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Maxime Hadjinlian @ 2015-07-16 16:30 UTC (permalink / raw)
  To: buildroot

If you select a custom skeleton, and have busybox or sysvinit as init,
the install of their inittab would trigger, rendering yours useless.

The hooks doing the sed in the skeleton package would only trigger for a
default skeleton.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/busybox/busybox.mk   | 2 +-
 package/sysvinit/sysvinit.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 6b2abca..7c208d3 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -148,7 +148,7 @@ define BUSYBOX_INSTALL_LOGGING_SCRIPT
 	else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
 endef
 
-ifeq ($(BR2_INIT_BUSYBOX),y)
+ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT)$(BR2_INIT_BUSYBOX),yy)
 define BUSYBOX_INSTALL_INITTAB
 	$(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab
 endef
diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk
index 2460dd9..34800d8 100644
--- a/package/sysvinit/sysvinit.mk
+++ b/package/sysvinit/sysvinit.mk
@@ -30,14 +30,20 @@ define SYSVINIT_BUILD_CMDS
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) SULOGINLIBS="-lcrypt" -C $(@D)/src
 endef
 
+ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT)$(BR2_INIT_SYSVINIT),yy)
+define SYSVINIT_INSTALL_INITTAB
+	$(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab
+endef
+endif
+
 define SYSVINIT_INSTALL_TARGET_CMDS
 	for x in halt init shutdown killall5; do \
 		$(INSTALL) -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \
 	done
-	$(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab
 	ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot
 	ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff
 	ln -sf killall5 $(TARGET_DIR)/sbin/pidof
+	$(SYSVINIT_INSTALL_INITTAB)
 endef
 
 $(eval $(generic-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-16 22:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 16:30 [Buildroot] [PATCH] package: Fix overwrite inittab w/ default skeleton Maxime Hadjinlian
2015-07-16 16:38 ` Gustavo Zacarias
2015-07-16 21:07 ` Thomas Petazzoni
2015-07-16 21:17   ` Gustavo Zacarias
2015-07-16 21:35     ` Thomas Petazzoni
2015-07-16 21:42       ` Maxime Hadjinlian
2015-07-16 22:56         ` Arnout Vandecappelle
2015-07-16 21:48       ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox