opnsense-src/usr.sbin/bsdinstall
Pierre Pronchery 605df6a3ae bsdinstall: restore the environment when restarting
It is possible to restart the installation process upon errors, when
installing normally through the `auto` script, or when installing a jail
with the `jail` script. However, some values obtained interactively from
the user or guessed by some scripts were kept in the environment when
restarting the process; this made it impossible to re-run some steps as
expected after the restart.

For instance, if a bad choice of mirror was made in the `mirrorselect`
phase, restarting the installer remembered the choice made, and would
never prompt for a different one again. Rebooting was then the only easy
way out of this situation.

This change restores a pre-defined list of environment variables when
restarting the installation process.

PR:		266987
Reviewed by:	emaste
Approved by:	philip (mentor)
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D42281

(cherry picked from commit 9de72af2cceb6fc4aead0990cccdf565531bc248)
2025-07-28 10:15:55 +02:00
..
distextract Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
distfetch bsdinstall: Consistently use item count as the first argument to calloc 2024-11-30 08:55:58 -05:00
partedit bsdinstall: react to WORKAROUND_HYBRID to force UEFI install on BIOS boot 2025-07-09 10:05:47 +02:00
runconsoles bsdinstall: Add a new runconsoles helper binary 2022-10-03 17:09:16 +01:00
scripts bsdinstall: restore the environment when restarting 2025-07-28 10:15:55 +02:00
bsdinstall Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
bsdinstall.8 bsdinstall: add menu to install firmware 2024-11-21 00:04:57 +00:00
Makefile bsdinstall: react to WORKAROUND_HYBRID to force UEFI install on BIOS boot 2025-07-09 10:05:47 +02:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Add a bsdinstall package 2015-03-18 12:28:17 +00:00
startbsdinstall bsdinstall: rename "Live CD" to "Live System" 2024-01-07 14:31:10 -05:00