Accepting request 993203 from home:joeyli:branches:devel:openSUSE:Factory

Add logic to shim.spec for detecting --set-sbat-policy option before using mokutil to set sbat policy. (bsc#1202120)

OBS-URL: https://build.opensuse.org/request/show/993203
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=191
This commit is contained in:
Joey Lee 2022-08-05 05:58:36 +00:00 committed by Git OBS Bridge
parent 63fb624566
commit a379c7b18b
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 5 05:25:16 UTC 2022 - Joey Lee <jlee@suse.com>
- Add logic to shim.spec for detecting --set-sbat-policy option before
using mokutil to set sbat policy. (bsc#1202120)
-------------------------------------------------------------------
Fri Jul 29 02:36:36 UTC 2022 - Joey Lee <jlee@suse.com>

View File

@ -308,7 +308,8 @@ is_efi () {
# run mokutil for setting sbat policy to latest mode
SBAT_POLICY=/sys/firmware/efi/efivars/SbatPolicy-605dab50-e046-4300-abb6-3dd810dd8b23
if is_efi; then
if [ ! -f "$SBAT_POLICY" ]; then
if [ ! -f "$SBAT_POLICY" ] && mokutil -h | grep -q "set-sbat-policy"; then
# Only apply CA check on the kernel package certs (bsc#1173115)
mokutil --set-sbat-policy latest
fi
fi