diff --git a/usr/bin/archboot-secureboot-keys.sh b/usr/bin/archboot-secureboot-keys.sh index 4e9892ab8..1876a36f1 100755 --- a/usr/bin/archboot-secureboot-keys.sh +++ b/usr/bin/archboot-secureboot-keys.sh @@ -16,7 +16,7 @@ usage () { _DIR="${2}" while [ $# -gt 0 ]; do case ${1} in - -name=*|--name=*) NAME="$(echo "${1}" | awk -F= '{print $2;}')" ;; + -name=*|--name=*) NAME="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;; -h|--h|?) usage ;; esac shift diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index 9fa86fe65..7a411a36b 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -60,8 +60,8 @@ _set_uefi_parameters() { [[ -e "/sys/firmware/efi" ]] && _UEFI_BOOT=1 if [[ -n "${_UEFI_BOOT}" ]]; then _GUIDPARAMETER=1 - _SECUREBOOT_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot 2>"${_NO_LOG}" | tail -n -1 | awk '{print $2}')" - _SETUPMODE_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SetupMode 2>"${_NO_LOG}" | tail -n -1 | awk '{print $2}')" + _SECUREBOOT_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot 2>"${_NO_LOG}" | rg -o ' ([0-9]+)' -r '$1')" + _SETUPMODE_VAR_VALUE="$(efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SetupMode 2>"${_NO_LOG}" | rg -o ' ([0-9]+)' -r '$1')" if [[ "${_SECUREBOOT_VAR_VALUE}" == "01" ]] && [[ "${_SETUPMODE_VAR_VALUE}" == "00" ]]; then _UEFI_SECURE_BOOT=1 fi