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

View File

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

View File

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