You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.5 KiB
32 lines
1.5 KiB
#!/usr/bin/env bash
|
|
#
|
|
# Author: Dmitry Razumov <asmeron@ublinux.com>
|
|
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
|
|
#
|
|
|
|
ENABLED=yes
|
|
[[ ${ENABLED} == yes ]] || exit 0
|
|
DEBUGMODE=no
|
|
|
|
unset ROOTFS; [[ -d /usr/lib/ublinux ]] || ROOTFS=.
|
|
SOURCE=${ROOTFS}/usr/lib/ublinux/functions; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null || exit 0
|
|
SOURCE=${ROOTFS}/usr/lib/ublinux/default; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null || exit 0
|
|
|
|
SYSCONF="${ROOTFS}${SYSCONF}"
|
|
SOURCE=${SYSCONF}/config; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
SOURCE=${SYSCONF}/keyboard; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
debug_mode "$0" "$@"
|
|
|
|
# Установить NUMLOCK только для tty
|
|
[[ ${NUMLOCK} == @(yes|on|enable) ]] && for tty in /dev/tty[1-8]; do setleds -D +num < ${tty}; done
|
|
[[ ${NUMLOCK} == @(no|off|disable) ]] && for tty in /dev/tty[1-8]; do setleds -D -num < ${tty}; done
|
|
|
|
# kill -RTMIN+21 1 || busybox kill -RTMIN+21 1
|
|
[[ -x /usr/bin/plymouth ]] && /usr/bin/plymouth --wait quit
|
|
|
|
# Настроить шрифт и раскладку клавиатуры виртуальной консоли из /etc/vconsole.conf использует loadkeys setfont
|
|
[[ -x /usr/lib/systemd/systemd-vconsole-setup ]] && /usr/lib/systemd/systemd-vconsole-setup
|
|
|
|
# Если запускается multi-user.target то терминал переключить на tty 2
|
|
readlink -f /etc/systemd/system/default.target 2>/dev/null | grep -q multi-user.target && chvt 2
|