mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
skeleton: add default login port to /etc/securetty
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. [Peter: guard with single quotes] Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
8cb59e6585
commit
d67b3a54af
@ -161,6 +161,7 @@ def remove_redundant_deps(deps):
|
|||||||
return newdeps
|
return newdeps
|
||||||
|
|
||||||
TARGET_EXCEPTIONS = [
|
TARGET_EXCEPTIONS = [
|
||||||
|
"target-generic-securetty",
|
||||||
"target-generic-issue",
|
"target-generic-issue",
|
||||||
"target-generic-getty-busybox",
|
"target-generic-getty-busybox",
|
||||||
"target-generic-do-remount-rw",
|
"target-generic-do-remount-rw",
|
||||||
|
@ -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_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
|
||||||
TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
|
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:
|
target-generic-hostname:
|
||||||
mkdir -p $(TARGET_DIR)/etc
|
mkdir -p $(TARGET_DIR)/etc
|
||||||
echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
|
echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
|
||||||
@ -40,6 +44,10 @@ target-generic-do-remount-rw:
|
|||||||
target-generic-dont-remount-rw:
|
target-generic-dont-remount-rw:
|
||||||
$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
|
$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
|
||||||
|
|
||||||
|
ifneq ($(TARGET_GENERIC_GETTY),)
|
||||||
|
TARGETS += target-generic-securetty
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(TARGET_GENERIC_HOSTNAME),)
|
ifneq ($(TARGET_GENERIC_HOSTNAME),)
|
||||||
TARGETS += target-generic-hostname
|
TARGETS += target-generic-hostname
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user