distribution/packages/jelos/sources/scripts/error.sh

20 lines
333 B
Bash
Raw Normal View History

2022-02-05 14:23:32 +00:00
#!/usr/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present 351ELEC
. /etc/profile
clear
2022-02-05 14:23:32 +00:00
if [ -n "$1" ]
then
text_viewer -w -e -t "BIOS ERROR" -m "$*"
else
ERROR=$(tail -n 25 /var/log/es_launch_stderr.log)
if [ !-z "${ERROR}" ];
then
text_viewer -w -e -t ERROR -m "${ERROR}"
fi
fi
clear