diff --git a/usr/bin/archboot-cpio.sh b/usr/bin/archboot-cpio.sh index 6442b1355..efa12c276 100755 --- a/usr/bin/archboot-cpio.sh +++ b/usr/bin/archboot-cpio.sh @@ -8,7 +8,6 @@ shopt -s extglob -# shellcheck source=functions . /usr/lib/archboot/common.sh . /usr/lib/archboot/cpio.sh # needed files/directories @@ -191,12 +190,13 @@ if [[ -z "${KERNEL}" ]]; then [[ "${_RUNNING_ARCH}" == "aarch64" ]] && KERNEL="/boot/Image.gz" fi # allow * in config -KERNEL="$(echo ${KERNEL})" +#shellcheck disable=SC2116 +KERNEL="$(echo "${KERNEL}")" msg "Using kernel: ${KERNEL}" if [[ ! -f "${KERNEL}" ]]; then die "kernel image does not exist!" fi -_KERNELVERSION="$(_kver ${KERNEL})" +_KERNELVERSION="$(_kver "${KERNEL}")" _d_kmoduledir="/lib/modules/${_KERNELVERSION}" [[ -d "$_d_kmoduledir" ]] || die "'$_d_kmoduledir' is not a valid kernel module directory" _d_workdir="$(initialize_buildroot "${_KERNELVERSION}" "$_opttargetdir")" || exit 1 diff --git a/usr/bin/archboot-launcher.sh b/usr/bin/archboot-launcher.sh index 4eb397802..d80fb423a 100755 --- a/usr/bin/archboot-launcher.sh +++ b/usr/bin/archboot-launcher.sh @@ -77,6 +77,7 @@ _exit() { _show_login exit 0 elif [[ "${_EXIT}" == "2" ]]; then + COUNT=0 while true; do sleep 1 _COUNT=$((_COUNT+1)) @@ -86,6 +87,7 @@ _exit() { done | _dialog --title " System Reboot " --no-mouse --gauge "Rebooting in 10 seconds. Don't forget to remove the boot medium!" 6 75 0 reboot elif [[ "${_EXIT}" == "3" ]]; then + COUNT=0 while true; do sleep 1 _COUNT=$((_COUNT+1)) diff --git a/usr/lib/archboot/installer/quicksetup.sh b/usr/lib/archboot/installer/quicksetup.sh index bcbc55041..9d8b9c6bb 100644 --- a/usr/lib/archboot/installer/quicksetup.sh +++ b/usr/lib/archboot/installer/quicksetup.sh @@ -64,6 +64,10 @@ _auto_partition() { } _auto_create_filesystems() { + #shellcheck disable=SC2086 + _COUNT=0 + _MAX_COUNT=$(echo ${_FSSPECS} | wc -w) + _PROGRESS_COUNT=$((100/_MAX_COUNT)) ## make and mount filesystems for fsspec in ${_FSSPECS}; do _DEV="${_DISK}$(echo "${fsspec}" | tr -d ' ' | cut -f1 -d:)" @@ -337,10 +341,6 @@ _autoprepare() { else _FSSPECS="${_FSSPEC_ROOTDEV} ${_FSSPEC_BOOTDEV} ${_FSSPEC_HOMEDEV} ${_FSSPEC_SWAPDEV}" fi - #shellcheck disable=SC2086 - _MAX_COUNT=$(echo ${_FSSPECS} | wc -w) - _PROGRESS_COUNT=$((100/_MAX_COUNT)) - _COUNT=0 _auto_create_filesystems | _dialog --title " Filesystems " --no-mouse --gauge "Creating Filesystems on ${_DISK}..." 6 75 0 _dialog --title " Success " --no-mouse --infobox "Quick Setup was successful." 3 40 sleep 3