1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-18 18:51:16 +08:00
Files
small-package/base-files/files/usr/libexec/login.sh
2025-01-09 19:54:09 +08:00

18 lines
290 B
Bash
Executable File

#!/bin/sh
[ -t 0 ] && {
tty_dev=$(readlink /proc/self/fd/0)
case "$tty_dev" in
/dev/console|/dev/tty[0-9]*)
export TERM=${TERM:-linux}
;;
/dev/*)
export TERM=vt102
;;
esac
}
[ "$(uci -q get system.@system[0].ttylogin)" = 1 ] || exec /bin/login -f root
exec /bin/login