mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
local login tty can now be configured via os.conf
This commit is contained in:
parent
1e28728670
commit
94d1d199b9
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
os_debug="false"
|
os_debug="false"
|
||||||
os_prereleases="false"
|
os_prereleases="false"
|
||||||
|
os_tty_login="tty1"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user