fix MOTD for riscv64

This commit is contained in:
Tobias Powalowski 2022-09-17 12:02:45 +02:00
parent a14af89da3
commit bc354b5f73
3 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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() {

View file

@ -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}"