You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
813 B

#!/bin/bash -x
echo "Тест pesigcheck файлов пакета ${TEST_PACKAGE_NAME}"
source ../../library/sh_lib.sh
if [[ "${TEST_PACKAGE_NAME}" != "grub2-efi-x64" ]] && [[ "${TEST_PACKAGE_NAME}" != "grub2-efi-x64-cdboot" ]]; then
echo "ERROR: Неверное имя пакета - '${TEST_PACKAGE_NAME}'. Этот тест предназначен для пакетов grub2-efi-x64 и grub2-efi-x64-cdboot"
exit 1
fi
if [[ "${TEST_PACKAGE_NAME}" == "grub2-efi-x64" ]]; then
_FILE1='/boot/efi/EFI/msvsphere/grubx64.efi'
else
_FILE1='/boot/efi/EFI/msvsphere/gcdx64.efi'
fi
check=0
/bin/pesigcheck -n 0 -c /etc/pki/sb-certs/secureboot-grub2-x86_64.cer -i "${_FILE1}" | /bin/grep "\"${_FILE1}\" is valid."
check=$(eq_is_success ${check} 0)
check_test_status ${check} "$0"
exit ${check}