All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/sysvinit: comment out login line in inittab if getty is disabled
@ 2019-10-27 13:00 unixmania at gmail.com
  2019-10-27 13:11 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: unixmania at gmail.com @ 2019-10-27 13:00 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

When the "Run a getty" option is disabled, sysvinit doesn't remove the
/etc/inittab line from previous builds. With this patch, the line is
correctly commented out.

Based on similar change made by Stephen Bos <stephen.bos@hagergroup.com>
and Christophe Blaess <christophe.blaess@logilin.fr> for busybox.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
 package/sysvinit/sysvinit.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk
index 98a37fc760..c778a9cde5 100644
--- a/package/sysvinit/sysvinit.mk
+++ b/package/sysvinit/sysvinit.mk
@@ -36,8 +36,13 @@ define SYSVINIT_SET_GETTY
 	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(SYSTEM_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
 		$(TARGET_DIR)/etc/inittab
 endef
-SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY
+else
+define SYSVINIT_SET_GETTY
+	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 #~' \
+		$(TARGET_DIR)/etc/inittab
+endef
 endif # BR2_TARGET_GENERIC_GETTY
+SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY
 
 SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
 
-- 
2.18.1

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

* [Buildroot] [PATCH] package/sysvinit: comment out login line in inittab if getty is disabled
  2019-10-27 13:00 [Buildroot] [PATCH] package/sysvinit: comment out login line in inittab if getty is disabled unixmania at gmail.com
@ 2019-10-27 13:11 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-10-27 13:11 UTC (permalink / raw)
  To: buildroot

On Sun, 27 Oct 2019 10:00:07 -0300
unixmania at gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> When the "Run a getty" option is disabled, sysvinit doesn't remove the
> /etc/inittab line from previous builds. With this patch, the line is
> correctly commented out.
> 
> Based on similar change made by Stephen Bos <stephen.bos@hagergroup.com>
> and Christophe Blaess <christophe.blaess@logilin.fr> for busybox.
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
>  package/sysvinit/sysvinit.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-10-27 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 13:00 [Buildroot] [PATCH] package/sysvinit: comment out login line in inittab if getty is disabled unixmania at gmail.com
2019-10-27 13:11 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.