Compare commits
2 Commits
a61f5f4fa7
...
09301d478b
Author | SHA1 | Date |
---|---|---|
nkraetzschmar | 09301d478b | |
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>
|
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
|
||||||
</varlistentry>
|
</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>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ typedef struct {
|
||||||
bool auto_poweroff;
|
bool auto_poweroff;
|
||||||
bool auto_reboot;
|
bool auto_reboot;
|
||||||
bool reboot_for_bitlocker;
|
bool reboot_for_bitlocker;
|
||||||
|
bool reboot_on_err;
|
||||||
secure_boot_enroll secure_boot_enroll;
|
secure_boot_enroll secure_boot_enroll;
|
||||||
bool force_menu;
|
bool force_menu;
|
||||||
bool use_saved_entry;
|
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(" auto-reboot: %ls\n", yes_no(config->auto_reboot));
|
||||||
printf(" beep: %ls\n", yes_no(config->beep));
|
printf(" beep: %ls\n", yes_no(config->beep));
|
||||||
printf(" reboot-for-bitlocker: %ls\n", yes_no(config->reboot_for_bitlocker));
|
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) {
|
switch (config->secure_boot_enroll) {
|
||||||
case ENROLL_OFF:
|
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",
|
log_error("Error parsing 'reboot-for-bitlocker' config option, ignoring: %s",
|
||||||
value);
|
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")) {
|
} else if (streq8(key, "secure-boot-enroll")) {
|
||||||
if (streq8(value, "manual"))
|
if (streq8(value, "manual"))
|
||||||
config->secure_boot_enroll = ENROLL_MANUAL;
|
config->secure_boot_enroll = ENROLL_MANUAL;
|
||||||
|
@ -2946,8 +2952,12 @@ static EFI_STATUS run(EFI_HANDLE image) {
|
||||||
(void) process_random_seed(root_dir);
|
(void) process_random_seed(root_dir);
|
||||||
|
|
||||||
err = image_start(image, entry);
|
err = image_start(image, entry);
|
||||||
if (err != EFI_SUCCESS)
|
if (err != EFI_SUCCESS) {
|
||||||
return err;
|
if (config.reboot_on_err)
|
||||||
|
reboot_system();
|
||||||
|
else
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
menu = true;
|
menu = true;
|
||||||
config.timeout_sec = 0;
|
config.timeout_sec = 0;
|
||||||
|
|
Loading…
Reference in New Issue