opnsense-src/usr.sbin/bsdinstall/scripts
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
..
adduser Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
auto bsdinstall: restore the environment when restarting 2025-07-28 10:15:55 +02:00
bootconfig Copy the new ia32 loader 2025-03-25 19:28:38 -06:00
checksum bsdinstall: Encode dists to valid variable names in checksum script 2023-12-13 21:45:45 +00:00
config Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
docsinstall bsdinstall: update comment related to pkg 2024-05-02 21:07:33 +00:00
entropy Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fetchmissingdists Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
firmware bsdinstall: add menu to install firmware 2024-11-21 00:04:57 +00:00
hardening Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
hostname Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
jail bsdinstall: restore the environment when restarting 2025-07-28 10:15:55 +02:00
keymap Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile bsdinstall: add menu to install firmware 2024-11-21 00:04:57 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mirrorselect bsdinstall: prefer HTTP 2024-03-07 10:27:28 +08:00
mount Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netconfig bsdinstall: Drop Error from title in netconfig no interfaces dialog 2024-09-07 01:00:51 +01:00
netconfig_ipv4 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netconfig_ipv6 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rootpass Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
script Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
services Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
time Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
umount Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
wlanconfig bsdinstall: wlanconfig: ensure the interface is always up for scanning 2025-07-28 10:15:22 +02:00
zfsboot zfsboot: fix misuse of the phrase zpool 2025-07-09 10:05:40 +02:00