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
807 B
25 lines
807 B
1 year ago
|
#!/bin/bash -x
|
||
|
|
||
|
echo "Тест pesigcheck файлов пакета ${TEST_PACKAGE_NAME}"
|
||
|
|
||
12 months ago
|
source library/sh_lib.sh
|
||
1 year ago
|
|
||
|
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}
|