]> git.proxmox.com Git - pve-installer.git/commitdiff
move setting global environment variables into ISO env
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Jun 2023 19:16:03 +0000 (21:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Jun 2023 19:49:00 +0000 (21:49 +0200)
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>
Proxmox/Install/ISOEnv.pm
proxinstall

index d43e1f92b04473ce986074b70ed0690929b79ae1..faca0269109d42978a3fcc8e6e500dd4d0e977d6 100644 (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};
index d19f314751a10c3a7cf76edb1bb9246914264139..04845e85e311e51faa1eab9799528a0d22136bb1 100755 (executable)
@@ -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();