bootctl: move conditions into corresponding functions
This commit is contained in:
@@ -626,6 +626,9 @@ static int efi_timestamp(EFI_TIME *ret) {
|
||||
#endif
|
||||
|
||||
static int install_secure_boot_auto_enroll(const char *esp, X509 *certificate, EVP_PKEY *private_key) {
|
||||
if (!arg_secure_boot_auto_enroll)
|
||||
return 0;
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
int r;
|
||||
|
||||
@@ -1101,17 +1104,13 @@ int verb_install(int argc, char *argv[], void *userdata) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (arg_install_random_seed) {
|
||||
r = install_random_seed(arg_esp_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
r = install_random_seed(arg_esp_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (arg_secure_boot_auto_enroll) {
|
||||
r = install_secure_boot_auto_enroll(arg_esp_path, certificate, private_key);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
r = install_secure_boot_auto_enroll(arg_esp_path, certificate, private_key);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
r = install_loader_specification(arg_dollar_boot_path());
|
||||
|
||||
Reference in New Issue
Block a user