Commit 989c903e authored by Michael Shigorin's avatar Michael Shigorin

initial tty feature

This one only cares for serial console(s) in sysvinit case now but might end up controlling the number of gettys for ve/vm, etc.
parent de384139
Эта фича занимается терминалами ввода-вывода, в первую очередь
COM-портами (serial console).
Следует заметить, что systemd занимается развешиванием agetty
самостоятельно.
use/tty:
@$(call add_feature)
@$(call xport,TTY_DEV)
@$(call xport,TTY_RATE)
use/tty/S0: use/tty
@$(call add,THE_PACKAGES,agetty)
@$(call add,TTY_DEV,ttyS0)
@$(call set,TTY_RATE,115200)
#!/bin/sh
# setup serial console access
BIN=/sbin/agetty
CFG=/etc/inittab
SEC=/etc/securetty
[ -n "$GLOBAL_TTY_DEV" -a -n "$GLOBAL_TTY_RATE" ] || exit 0
[ -s "$CFG" -a -x "$BIN" ] || exit 0
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
n=$(($n+1))
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment