]>
git.proxmox.com Git - pve-installer.git/blob - Proxmox/Install/Env.pm
1 package Proxmox
::Install
::Env
;
7 our @EXPORT = qw(is_test_mode);
11 fullname
=> 'Proxmox VE',
17 fullname
=> 'Proxmox Mail Gateway',
23 fullname
=> 'Proxmox Backup Server',
31 my $cd_info = get_cd_info
();
32 my $product = $cd_info->{product
};
34 my $setup_info = $product_cfg->{$product};
35 die "unknown product '$product'\n" if !$setup_info;
37 $setup_info->{product
} = $product;
39 return ($setup_info, $cd_info);
43 my $info_fn = '/.cd-info'; # default place in the ISO environment
44 if (!-f
$info_fn && -f
"cd-info.test") {
45 $info_fn = "cd-info.test"; # use from CWD for test mode
48 open(my $fh, '<', $info_fn) or die "Could not open CD info file '$info_fn' $!";
51 while (my $line = <$fh>) {
53 if ($line =~ /^(\S+)=['"]?(.+?)['"]?$/) { # we control cd-info content, so good enough.
54 $cd_info->{lc($1)} = $2;
59 die "CD-info is missing required key 'product'!\n" if !defined $cd_info->{product
};
65 sub enable_test_mode
{