]> git.proxmox.com Git - pve-installer.git/blobdiff - proxinstall
ignore non-existent eula file in test mode
[pve-installer.git] / proxinstall
index fa51b17d390734c199769fc9d0c596a87faf2706..f865835c8963f9486ca5095ca240084396e0dce1 100755 (executable)
@@ -1742,7 +1742,11 @@ sub display_html {
     my $data = file_get_contents($path);
 
     if ($filename eq 'license.htm') {
-       my $license = decode('utf8', file_get_contents("${proxmox_cddir}/EULA"));
+       my $license = eval { decode('utf8', file_get_contents("${proxmox_cddir}/EULA")) };
+       if (my $err = $@) {
+           die $err if !$opt_testmode;
+           $license = "TESTMODE: Ignore non existent EULA...\n";
+       }
        my $title = "END USER LICENSE AGREEMENT (EULA)";
        $data =~ s/__LICENSE__/$license/;
        $data =~ s/__LICENSE_TITLE__/$title/;