[Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty
Tzu-Jung Lee
roylee17 at gmail.com
Tue May 21 09:56:31 UTC 2013
We ran into a "Login incorrect" problem when running the same rootfs
image across platforms with different loging ports ttyS0/1/2/3.
Simply assignning "console" to BR2_TARGET_GENERIC_GETTY_PORT, which in
turn modifies the /etc/inittab, is not enough because the "console" device
was missing in the /etc/securetty.
While current securetty has enumerated a lot of ttys, this patch should save
some efforts to enumerate more.
Signed-off-by: Tzu-Jung Lee <tjlee at ambarella.com>
---
system/system.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/system/system.mk b/system/system.mk
index 44a33ae..67d3113 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -40,6 +40,9 @@ target-generic-do-remount-rw:
target-generic-dont-remount-rw:
$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
+target-generic-securetty:
+ grep -q $(TARGET_GENERIC_GETTY) $(TARGET_DIR)/etc/securetty || echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty
+
ifneq ($(TARGET_GENERIC_HOSTNAME),)
TARGETS += target-generic-hostname
endif
@@ -60,4 +63,7 @@ TARGETS += target-generic-do-remount-rw
else
TARGETS += target-generic-dont-remount-rw
endif
+ifneq ($(TARGET_GENERIC_GETTY),)
+TARGETS += target-generic-securetty
+endif
endif
--
1.8.2.1
More information about the buildroot
mailing list