summaryrefslogtreecommitdiffstats
path: root/system/system.mk
diff options
context:
space:
mode:
Diffstat (limited to 'system/system.mk')
-rw-r--r--system/system.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/system.mk b/system/system.mk
index 44a33ae61..50c86ad60 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -9,6 +9,10 @@ TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
+target-generic-securetty:
+ grep -q '^$(TARGET_GENERIC_GETTY)$$' $(TARGET_DIR)/etc/securetty || \
+ echo '$(TARGET_GENERIC_GETTY)' >> $(TARGET_DIR)/etc/securetty
+
target-generic-hostname:
mkdir -p $(TARGET_DIR)/etc
echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
@@ -40,6 +44,10 @@ target-generic-do-remount-rw:
target-generic-dont-remount-rw:
$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
+ifneq ($(TARGET_GENERIC_GETTY),)
+TARGETS += target-generic-securetty
+endif
+
ifneq ($(TARGET_GENERIC_HOSTNAME),)
TARGETS += target-generic-hostname
endif