move setting global environment variables into ISO env

could be also done in RunEnv, as one could argue both, this is
set at runtime, and this is for the ISO installer environment.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-19 21:16:03 +02:00
parent 71583761ea
commit ddd96e5cb9
2 changed files with 5 additions and 5 deletions

View File

@ -122,6 +122,11 @@ my sub get_locations {
};
}
# setup global environment already on module load
$ENV{DEBIAN_FRONTEND} = 'noninteractive';
$ENV{LC_ALL} = 'C';
$ENV{'LVM_SUPPRESS_FD_WARNINGS'} = '1';
sub setup {
my $cd_info = get_cd_info();
my $product = $cd_info->{product};

View File

@ -3,9 +3,6 @@
use strict;
use warnings;
$ENV{DEBIAN_FRONTEND} = 'noninteractive';
$ENV{LC_ALL} = 'C';
use Getopt::Long;
use IPC::Open2;
use IO::File;
@ -43,8 +40,6 @@ if (!$ENV{G_SLICE} || $ENV{G_SLICE} ne "always-malloc") {
Proxmox::Install::ISOEnv::set_test_image($test_image) if $test_image;
}
$ENV{'LVM_SUPPRESS_FD_WARNINGS'} = '1';
my $iso_env = Proxmox::Install::ISOEnv::setup();
my $run_env = Proxmox::Install::RunEnv::query_installation_environment();