replace uname -m with RUNNING_ARCH

This commit is contained in:
Tobias Powalowski 2022-09-19 15:47:20 +02:00
parent e6c7f6399f
commit 87e20552f1
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ LOCAL_DB="/var/cache/pacman/pkg/archboot.db"
RUNNING_ARCH="$(uname -m)"
KERNELPKG="linux"
# name of the kernel image
[[ "${RUNNING_ARCH}" == "x86_64" ]] && VMLINUZ="vmlinuz-${KERNELPKG}"
[[ "${RUNNING_ARCH}" == "x86_64" || "${RUNNING_ARCH}" == "riscv64" ]] && VMLINUZ="vmlinuz-${KERNELPKG}"
if [[ "${RUNNING_ARCH}" == "aarch64" ]]; then
VMLINUZ="Image.gz"
#shellcheck disable=SC2034
@ -123,7 +123,7 @@ auto_packages() {
marvell_firmware
### HACK:
# always add intel-ucode
if [[ "$(uname -m)" == "x86_64" ]]; then
if [[ "${RUNNING_ARCH}" == "x86_64" ]]; then
PACKAGES="${PACKAGES//\ intel-ucode\ / }"
PACKAGES="${PACKAGES} intel-ucode"
fi

View file

@ -82,7 +82,7 @@ update_environment() {
detect_uefi_boot
UPDATE_ENVIRONMENT=""
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt "2571000" ]]; then
if ! [[ "$(uname -m)" == "riscv64" ]]; then
if ! [[ "${RUNNING_ARCH}" == "riscv64" ]]; then
DIALOG --defaultno --yesno "Do you want to update the archboot environment to latest packages with caching packages for installation?\n\nATTENTION:\nThis will reboot the system using kexec!" 0 0 && UPDATE_ENVIRONMENT="1"
if [[ "${UPDATE_ENVIRONMENT}" == "1" ]]; then
DIALOG --infobox "Now setting up new archboot environment and dowloading latest packages.\n\nRunning at the moment: update-installer -latest-install\nCheck ${VC} console (ALT-F${VC_NUM}) for progress...\n\nGet a cup of coffee ...\nDepending on your system's setup, this needs about 5 minutes.\nPlease be patient." 0 0
@ -115,7 +115,7 @@ prepare_pacman() {
${PACMAN} -Sy > "${LOG}" 2>&1 || (DIALOG --msgbox "Pacman preparation failed! Check ${LOG} for errors." 6 60; return 1)
DIALOG --infobox "Update Arch Linux keyring ..." 3 40
KEYRING="archlinux-keyring"
[[ "$(uname -m)" == "aarch64" ]] && KEYRING="${KEYRING} archlinuxarm-keyring"
[[ "${RUNNING_ARCH}" == "aarch64" ]] && KEYRING="${KEYRING} archlinuxarm-keyring"
pacman -Sy ${PACMAN_CONF} --noconfirm --noprogressbar ${KEYRING} > "${LOG}" 2>&1 || (DIALOG --msgbox "Keyring update failed! Check ${LOG} for errors." 6 60; return 1)
}