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,29 +5,39 @@ conf="/data/etc/os.conf"
test -n "$os_version" || source /etc/init.d/base
case "$1" in
start)
msg_begin "Mounting filesystems"
/bin/mount -a
mount_fs() {
msg_begin "Mounting filesystems"
/bin/mount -a
test $? == 0 && msg_done || msg_fail
if [ -f $sys_conf ] && ! [ -f $conf ]; then
cp $sys_conf $conf
fi
if [ -f $conf ]; then
source $conf
fi
if [ "$os_debug" == "true" ]; then
msg_begin "Remounting boot partition read-write"
mount -o remount,rw /boot
test $? == 0 && msg_done || msg_fail
if [ -f $sys_conf ] && ! [ -f $conf ]; then
cp $sys_conf $conf
fi
msg_begin "Remounting root partition read-write"
mount -o remount,rw /
test $? == 0 && msg_done || msg_fail
fi
}
if [ -f $conf ]; then
source $conf
fi
mk_tty_login() {
test -z "$os_tty_login" && os_tty_login=tty1
ln -sf /dev/$os_tty_login /dev/ttylogin
}
if [ "$os_debug" == "true" ]; then
msg_begin "Remounting boot partition read-write"
mount -o remount,rw /boot
test $? == 0 && msg_done || msg_fail
msg_begin "Remounting root partition read-write"
mount -o remount,rw /
test $? == 0 && msg_done || msg_fail
fi
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"