diff --git a/usr/bin/archboot-cpio.sh b/usr/bin/archboot-cpio.sh index e61f74457..9a9422e77 100755 --- a/usr/bin/archboot-cpio.sh +++ b/usr/bin/archboot-cpio.sh @@ -17,7 +17,6 @@ _d_install=/lib/initcpio/install # options and runtime data _optgenimg='' _opttargetdir='' -_optosrelease='' _optquiet=1 _optcolor=1 declare -A _addedmodules _modpaths # Sanitize environment further diff --git a/usr/lib/archboot/cpio.sh b/usr/lib/archboot/cpio.sh index ca220f648..240af7dcc 100644 --- a/usr/lib/archboot/cpio.sh +++ b/usr/lib/archboot/cpio.sh @@ -144,7 +144,7 @@ add_firmware() { local -i r=1 fwpath=/lib/firmware for fw; do - # shellcheck disable=SC2154 + # shellcheck disable=SC2154,SC2153 if ! compgen -G "${BUILDROOT}${fwpath}/${fw}?(.*)" &>/dev/null; then if read -r fwfile < <(compgen -G "${fwpath}/${fw}?(.*)"); then map add_file "${fwfile[@]}" @@ -303,7 +303,7 @@ add_binary() { initialize_buildroot() { # creates a temporary directory for the buildroot and initialize it with a # basic set of necessary directories and symlinks - local workdir='' kernver="$1" arch buildroot osreleasefile + local workdir='' kernver="$1" arch buildroot arch="$(uname -m)" if ! workdir="$(mktemp -d --tmpdir mkinitcpio.XXXXXX)"; then error 'Failed to create temporary working directory in %s' "${TMPDIR:-/tmp}" diff --git a/usr/lib/archboot/iso.sh b/usr/lib/archboot/iso.sh index 7d2afe50a..78a885e20 100644 --- a/usr/lib/archboot/iso.sh +++ b/usr/lib/archboot/iso.sh @@ -42,7 +42,8 @@ _config() { _PRESET="${_PRESET_DIR}/${_PRESET}" #shellcheck disable=SC1090 source "${_PRESET}" - [[ -z "${_IMAGENAME}" ]] && _IMAGENAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver ${ALL_kver})-${_ARCH}" + #shellcheck disable=SC2154 + [[ -z "${_IMAGENAME}" ]] && _IMAGENAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver "${ALL_kver}")-${_ARCH}" } ### EFI status of RISCV64: diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index c7def05ad..184093ddf 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -100,7 +100,7 @@ _run_update_installer() { sleep 1 _COUNT=$((_COUNT+1)) # abort after 10 seconds - _progress "$((${_COUNT}*10))" "Waiting $((10-${_COUNT})) seconds to stop the process with CTRL-C..." + _progress "$((_COUNT*10))" "Waiting $((10-_COUNT)) seconds to stop the process with CTRL-C..." [[ "${_COUNT}" == 10 ]] && break done | _dialog --title " Stop Processing? " --no-mouse --gauge "Waiting 10 seconds to stop the process with CTRL-C..." 6 60 0 if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 2571000 ]]; then diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index f8c38292e..0bb905e5f 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -34,9 +34,8 @@ _create_iso() { # create container archboot-"${_ARCH}"-create-container.sh "${_W_DIR}" -cc --install-source="${2}" || exit 1 _create_archboot_db "${_W_DIR}${_CACHEDIR}" - _KERNEL_VERSION="$(${_NSPAWN} ${_W_DIR} /bin/bash -c ". /usr/lib/archboot/common.sh; _kver $(grep 'kver' ${_W_DIR}/etc/archboot/presets/${_ARCH} | cut -d '=' -f2)")" + _KERNEL_VERSION="$(${_NSPAWN} "${_W_DIR}" /bin/bash -c ". /usr/lib/archboot/common.sh; _kver $(grep 'kver' "${_W_DIR}/etc/archboot/presets/${_ARCH}" | cut -d '=' -f2)")" _ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-${_KERNEL_VERSION}" - echo $_KERNEL_VERSION $_ISONAME # riscv64 does not support kexec at the moment if ! [[ "${_ARCH}" == "riscv64" ]]; then # generate tarball in container, umount tmp container tmpfs, else weird things could happen