Skip to content

Commit

Permalink
info level output if SecureBoot is enabled or disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Aug 15, 2023
1 parent da28756 commit 5c77d03
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions usr/bin/installer-dist
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ get_independent_host_pkgs(){
has timeout || die 1 "${underline}Packages Installed Check:${nounderline} Timeout utility is missing."
has curl || install_pkg curl
has rsync || install_pkg rsync
has mokutil || install_pkg mokutil

## Install openssl and ca-certificates.
## openssl is required:
Expand Down Expand Up @@ -894,6 +895,17 @@ nested_virtualization_test() {
}


secure_boot_test() {
local mokutil_output mokutil_exit_code
mokutil_exit_code=0
if mokutil_output=$(mokutil --sb-state 2>&1) ; then
log info "${underline}Secure Boot Check Result:${nounderline} 'enabled' (mokutil_output: '$mokutil_output') Ok."
else
log info "${underline}Secure Boot Check Result:${nounderline} 'disabled' (mokutil_output: '$mokutil_output') Ok."
fi
}


## Install package only if not installed already.
install_pkg(){
pkgs="${*}"
Expand Down Expand Up @@ -2053,6 +2065,7 @@ pre_check(){
get_host_pkgs
get_independent_host_pkgs
nested_virtualization_test
secure_boot_test

## onion=1 -- Always torify onion connections.
## onion=* -- Only torify clearnet if SOCKS proxy is specified.
Expand Down

0 comments on commit 5c77d03

Please sign in to comment.