mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
getty: add the ability to pass options to getty
Signed-off-by: Assaf Inbal <shmuelzon@gmail.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
ed6912e87d
commit
a68a51257e
@ -244,6 +244,13 @@ config BR2_TARGET_GENERIC_GETTY_TERM
|
|||||||
default "vt100"
|
default "vt100"
|
||||||
help
|
help
|
||||||
Specify a TERM type.
|
Specify a TERM type.
|
||||||
|
|
||||||
|
config BR2_TARGET_GENERIC_GETTY_OPTIONS
|
||||||
|
string "other options to pass to getty"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Any other flags you want to pass to getty,
|
||||||
|
Refer to getty --help for details.
|
||||||
endmenu
|
endmenu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD)
|
|||||||
TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
|
TARGET_GENERIC_GETTY_PORT = $(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_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS))
|
||||||
|
|
||||||
target-generic-securetty:
|
target-generic-securetty:
|
||||||
grep -q '^$(TARGET_GENERIC_GETTY_PORT)$$' $(TARGET_DIR)/etc/securetty || \
|
grep -q '^$(TARGET_GENERIC_GETTY_PORT)$$' $(TARGET_DIR)/etc/securetty || \
|
||||||
@ -29,13 +30,13 @@ target-root-passwd:
|
|||||||
$(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow
|
$(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow
|
||||||
|
|
||||||
target-generic-getty-busybox:
|
target-generic-getty-busybox:
|
||||||
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
|
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
|
||||||
$(TARGET_DIR)/etc/inittab
|
$(TARGET_DIR)/etc/inittab
|
||||||
|
|
||||||
# In sysvinit inittab, the "id" must not be longer than 4 bytes, so we
|
# In sysvinit inittab, the "id" must not be longer than 4 bytes, so we
|
||||||
# skip the "tty" part and keep only the remaining.
|
# skip the "tty" part and keep only the remaining.
|
||||||
target-generic-getty-sysvinit:
|
target-generic-getty-sysvinit:
|
||||||
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
|
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
|
||||||
$(TARGET_DIR)/etc/inittab
|
$(TARGET_DIR)/etc/inittab
|
||||||
|
|
||||||
# Find commented line, if any, and remove leading '#'s
|
# Find commented line, if any, and remove leading '#'s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user