From bc354b5f7361491f2b0d3488638f8fa2e0343629 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 17 Sep 2022 12:02:45 +0200 Subject: [PATCH] fix MOTD for riscv64 --- usr/bin/archboot-riscv64-release.sh | 1 + usr/lib/archboot/iso.sh | 6 +++--- usr/lib/initcpio/install/archboot_motd | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usr/bin/archboot-riscv64-release.sh b/usr/bin/archboot-riscv64-release.sh index c282f21f5..e23d7dc85 100755 --- a/usr/bin/archboot-riscv64-release.sh +++ b/usr/bin/archboot-riscv64-release.sh @@ -6,6 +6,7 @@ _ARCHBOOT="archboot-riscv" . /usr/lib/archboot/release.sh [[ -z "${1}" ]] && _usage _root_check +_loop_check echo "Start release creation in $1 ..." _create_iso "$@" || exit 1 _create_boot || exit 1 diff --git a/usr/lib/archboot/iso.sh b/usr/lib/archboot/iso.sh index 32a6614e4..530657783 100644 --- a/usr/lib/archboot/iso.sh +++ b/usr/lib/archboot/iso.sh @@ -213,7 +213,7 @@ _prepare_extlinux_image() { echo "Prepare extlinux image ..." ## get size of boot files BOOTSIZE=$(du -bc "${_ISODIR}"/boot | grep total | cut -f1) - IMGSZ=$(( (BOOTSIZE*118)/100/1024 + 1)) # image size in sectors + IMGSZ=$(( (BOOTSIZE*117)/100/1024 + 1)) # image size in sectors ## Create extlinux.img dd if=/dev/zero of="${_ISODIR}"/extlinux.img bs="${IMGSZ}" count=1024 status=none EXT_IMAGE="${_ISODIR}/extlinux.img" @@ -254,8 +254,8 @@ _create_cksum() { ## create sha256sums.txt echo "Generating sha256sum ..." [[ -f "sha256sums.txt" ]] && rm "sha256sums.txt" - echo ./*.iso >/dev/null 2>&1 && cksum -a sha256 ./*.iso > "sha256sums.txt" - echo ./*.img >/dev/null 2>&1 && cksum -a sha256 ./*.img > "sha256sums.txt" + [[ "$(echo ./*.iso)" == "./*.iso" ]] || cksum -a sha256 ./*.iso > "sha256sums.txt" + [[ "$(echo ./*.img)" == "./*.img" ]] || cksum -a sha256 ./*.img > "sha256sums.txt" } _cleanup_iso() { diff --git a/usr/lib/initcpio/install/archboot_motd b/usr/lib/initcpio/install/archboot_motd index 060886b06..b3f632d01 100644 --- a/usr/lib/initcpio/install/archboot_motd +++ b/usr/lib/initcpio/install/archboot_motd @@ -7,6 +7,7 @@ build () MOTD=$(mktemp /var/tmp/motd.XXXX) [[ "$(uname -m)" == "x86_64" ]] && echo -e "\033[1mWelcome to \033[36mArchboot\033[0m\033[1m - Arch Linux\033[0m" >> "${MOTD}" [[ "$(uname -m)" == "aarch64" ]] && echo -e "\033[1mWelcome to \033[36mArchboot\033[0m\033[1m - Arch Linux ARM\033[0m" >> "${MOTD}" + [[ "$(uname -m)" == "riscv64" ]] && echo -e "\033[1mWelcome to \033[36mArchboot\033[0m\033[1m - Arch Linux RISCV-V64\033[0m" >> "${MOTD}" #shellcheck disable=SC2129 echo -e "\033[1m--------------------------------------------\033[0m" >> "${MOTD}" echo -e "\033[1mConsoles:\033[0m" >> "${MOTD}"