/*
* enforce the start of the recovery system when
* - the appropriate keys were pressed
- * - a previous installation was aborted or has failed
* - "some" external software told us to
+ * - a previous installation was aborted or has failed
*/
want_recovery = 0;
keys = gpio_querykbd();
printf("detected recovery request (keyboard)\n");
want_recovery = 1;
}
+ s = getenv("want_recovery");
+ if ((s != NULL) && (*s != '\0')) {
+ printf("detected recovery request (environment)\n");
+ want_recovery = 1;
+ }
s = getenv("install_in_progress");
if ((s != NULL) && (*s != '\0')) {
printf("previous installation has not completed\n");
printf("previous installation has failed\n");
want_recovery = 1;
}
- s = getenv("want_recovery");
- if ((s != NULL) && (*s != '\0')) {
- printf("detected recovery request (environment)\n");
- want_recovery = 1;
- }
if (want_recovery) {
printf("enforced start of the recovery system\n");
setenv("bootcmd", "run recovery");