correct path usage for vconsole fb0

This commit is contained in:
Tobias Powalowski 2023-11-18 20:49:12 +01:00
parent daca1aaf45
commit 26a1206f40
5 changed files with 7 additions and 28 deletions

View file

@ -4,7 +4,8 @@
# archboot-vconsole.sh - sets bigger font on bigger display resolutions
# by Tobias Powalowski <tpowa@archlinux.org>
#
FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '/sys/class/graphics/fb0/modes')" 2>"${_NO_LOG}" | sed -e 's#.*:##g')"
udevadm settle
FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '/sys/class/graphics/fb0/modes')" 2>/dev/null | sed -e 's#.*:##g')"
if [[ "${FB_SIZE}" -gt '1900' ]]; then
SIZE="32"
else

View file

@ -85,16 +85,12 @@ protocols,request-key.conf,securetty,services}
/usr/bin/detect-vconsole.sh
_file_rename /usr/share/archboot/base/etc/systemd/system/detect-vconsole.service \
/etc/systemd/system/detect-vconsole.service
_file_rename /usr/share/archboot/base/etc/systemd/system/detect-vconsole-restart.service \
/etc/systemd/system/detect-vconsole-restart.service
_file_rename /usr/share/archboot/base/etc/systemd/system/detect-vconsole-restart.path \
/etc/systemd/system/detect-vconsole-restart.path
_file_rename /usr/share/archboot/base/etc/systemd/system/detect-vconsole.path \
/etc/systemd/system/detect-vconsole.path
_symlink /etc/systemd/system/sysinit.target.wants/detect-vconsole.path \
/etc/systemd/system/detect-vconsole.path
_symlink /etc/systemd/system/multi-user.target.wants/windowkeys.service \
/etc/systemd/system/windowkeys.service
_symlink /etc/systemd/system/sysinit.target.wants/detect-vconsole.service \
/etc/systemd/system/detect-vconsole.service
_symlink /etc/systemd/system/sysinit.target.wants/detect-vconsole-restart.path \
/etc/systemd/system/detect-vconsole-restart.path
# disable systemd targets:
for i in remote-{veritysetup,cryptsetup} sockets timers; do
_symlink "/etc/systemd/system/${i}.target" /dev/null

View file

@ -1,15 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# by Tobias Powalowski <tpowa@archlinux.org>
[Unit]
Description=Restart vconsole detection if modes changed
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=systemctl restart detect-vconsole.service
ExecStart=systemctl restart systemd-vconsole-setup
[Install]
WantedBy=sysinit.target

View file

@ -2,7 +2,7 @@
# by Tobias Powalowski <tpowa@archlinux.org>
[Path]
PathChanged=/sys/class/graphics/fb0/modes
PathModified=/sys/class/graphics/fb0
[Install]
WantedBy=sysinit.target

View file

@ -6,12 +6,9 @@ Description=Set vconsole on display resolution
After=systemd-udev-trigger.service
Before=systemd-vconsole-setup.service
Wants=systemd-vconsole-setup.service
ConditionPathExists=/sys/class/graphics/fb0/modes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/detect-vconsole.sh
[Install]
WantedBy=sysinit.target