From a19a1dd1a5685423e1b5aec5d02c98d761d83d2d Mon Sep 17 00:00:00 2001 From: Fabio Belavenuto Date: Thu, 29 Sep 2022 16:33:15 -0300 Subject: [PATCH] Fix $COLUMNS visual bug --- TODO | 3 ++- files/board/arpl/overlayfs/opt/arpl/boot.sh | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 4312b49c..c9cc2282 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,8 @@ A fazer - Checar NVME no modelo DS920+, DS918+ - J4125, HP G7 N40L desligando (#110 #160) - - Checar módulo tg3 no próprio loader (BCM57780 [1025:033d]) (#31) + - Checar módulo tg3 no próprio loader (BCM57780 [14e4:1692]) (#31) + - Ver se vale a pena colocar uma opção para configurações extras, como escolher qual módulo realtek usar (R8168 ou R8169) Concluidos: - Generalizar código dos addons diff --git a/files/board/arpl/overlayfs/opt/arpl/boot.sh b/files/board/arpl/overlayfs/opt/arpl/boot.sh index dea1aa50..0ed74640 100755 --- a/files/board/arpl/overlayfs/opt/arpl/boot.sh +++ b/files/board/arpl/overlayfs/opt/arpl/boot.sh @@ -7,13 +7,14 @@ set -e # Sanity check loaderIsConfigured || die "Loader is not configured!" -# Print text centralized, if variable ${COLUMNS} is defined +# Print text centralized clear +[ -z "${COLUMNS}" ] && COLUMNS=50 TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}" -printf "\033[1;44m%*s\n" $COLUMNS "" -printf "\033[1;44m%*s\033[A\n" $COLUMNS "" -printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE}+$COLUMNS)/2)) "${TITLE}" -printf "\033[1;44m%*s\033[0m\n" $COLUMNS "" +printf "\033[1;44m%*s\n" ${COLUMNS} "" +printf "\033[1;44m%*s\033[A\n" ${COLUMNS} "" +printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}" +printf "\033[1;44m%*s\033[0m\n" ${COLUMNS} "" TITLE="BOOTING..." printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"