Compare commits
2 Commits
867abfb4fa
...
86933057df
Author | SHA1 | Date |
---|---|---|
nkraetzschmar | 86933057df | |
nkraetzschmar | 76e563900e |
|
@ -399,6 +399,14 @@ sbvarsign --attr "${attr}" --key KEK.key --cert KEK.pem --output db.auth db db.e
|
|||
|
||||
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>reboot-on-error</term>
|
||||
|
||||
<listitem><para>Takes a boolean argument. Enable or disable (the default) auto reboot in case the selected entry fails to start.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ typedef struct {
|
|||
bool auto_poweroff;
|
||||
bool auto_reboot;
|
||||
bool reboot_for_bitlocker;
|
||||
bool reboot_on_err;
|
||||
secure_boot_enroll secure_boot_enroll;
|
||||
bool force_menu;
|
||||
bool use_saved_entry;
|
||||
|
@ -538,6 +539,7 @@ static void print_status(Config *config, char16_t *loaded_image_path) {
|
|||
printf(" auto-reboot: %ls\n", yes_no(config->auto_reboot));
|
||||
printf(" beep: %ls\n", yes_no(config->beep));
|
||||
printf(" reboot-for-bitlocker: %ls\n", yes_no(config->reboot_for_bitlocker));
|
||||
printf(" reboot-on-error: %ls\n", yes_no(config->reboot_on_err));
|
||||
|
||||
switch (config->secure_boot_enroll) {
|
||||
case ENROLL_OFF:
|
||||
|
@ -1276,6 +1278,10 @@ static void config_defaults_load_from_file(Config *config, char *content) {
|
|||
log_error("Error parsing 'reboot-for-bitlocker' config option, ignoring: %s",
|
||||
value);
|
||||
|
||||
} else if (streq8(key, "reboot-on-error")) {
|
||||
if (!parse_boolean(value, &config->reboot_on_err))
|
||||
log_error("Error parsing 'reboot-on-error' config option, ignoring: %s", value);
|
||||
|
||||
} else if (streq8(key, "secure-boot-enroll")) {
|
||||
if (streq8(value, "manual"))
|
||||
config->secure_boot_enroll = ENROLL_MANUAL;
|
||||
|
@ -2946,8 +2952,12 @@ static EFI_STATUS run(EFI_HANDLE image) {
|
|||
(void) process_random_seed(root_dir);
|
||||
|
||||
err = image_start(image, entry);
|
||||
if (err != EFI_SUCCESS)
|
||||
return err;
|
||||
if (err != EFI_SUCCESS) {
|
||||
if (config.reboot_on_err)
|
||||
reboot_system();
|
||||
else
|
||||
return err;
|
||||
}
|
||||
|
||||
menu = true;
|
||||
config.timeout_sec = 0;
|
||||
|
|
Loading…
Reference in New Issue