tty: use proper i-f-serial

...the one starting agetty in installer if told so (0.4+);
also improve runlevel 2 with potential serial access.
This commit is contained in:
Michael Shigorin 2018-10-17 17:37:40 +03:00
parent b13ba8129f
commit ce0f4ed33c
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ use/tty:
@$(call xport,TTY_DEV)
@$(call xport,TTY_RATE)
ifeq (distro,$(IMAGE_CLASS))
@$(call add,INSTALL2_PACKAGES,installer-feature-serial-stage2)
@$(call add,BASE_PACKAGES,installer-feature-serial-stage3)
endif

View File

@ -11,8 +11,8 @@ SEC=/etc/securetty
if ! grep -q "$BIN" "$CFG"; then
n=0
for t in $GLOBAL_TTY_DEV; do
grep -q "$t" "$SEC" || echo "$t" >> "$SEC"
echo "T$n:345:respawn:$BIN -L $t $GLOBAL_TTY_RATE vt100" >> $CFG
grep -q "$t" "$SEC" || echo "$t" >>"$SEC"
echo "T$n:2345:respawn:$BIN -L $t $GLOBAL_TTY_RATE vt100" >>$CFG
n=$(($n+1))
done
fi