local login tty can now be configured via os.conf

This commit is contained in:
Calin Crisan 2016-03-18 20:28:46 +02:00
parent 1e28728670
commit 94d1d199b9
3 changed files with 32 additions and 22 deletions

View File

@ -5,8 +5,7 @@ conf="/data/etc/os.conf"
test -n "$os_version" || source /etc/init.d/base
case "$1" in
start)
mount_fs() {
msg_begin "Mounting filesystems"
/bin/mount -a
test $? == 0 && msg_done || msg_fail
@ -28,6 +27,17 @@ case "$1" in
mount -o remount,rw /
test $? == 0 && msg_done || msg_fail
fi
}
mk_tty_login() {
test -z "$os_tty_login" && os_tty_login=tty1
ln -sf /dev/$os_tty_login /dev/ttylogin
}
case "$1" in
start)
mount_fs
mk_tty_login
;;
stop)

View File

@ -17,9 +17,8 @@
::sysinit:/etc/init.d/mountsys
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
tty1::respawn:/sbin/getty -L tty1 115200 vt100
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
# Start a getty for local login
ttylogin::respawn:/sbin/getty -L ttylogin 115200 vt100
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

View File

@ -1,3 +1,4 @@
os_debug="false"
os_prereleases="false"
os_tty_login="tty1"