]> git.proxmox.com Git - pve-installer.git/blobdiff - proxinstall
bump version to 6.0-1
[pve-installer.git] / proxinstall
index fa51b17d390734c199769fc9d0c596a87faf2706..2c44567f4dc9d6eee437d5e8223fc36733ab4031 100755 (executable)
@@ -1289,6 +1289,11 @@ sub extract_data {
            }
        }
 
+       mkdir "$targetdir/mnt";
+       mkdir "$targetdir/mnt/hostrun";
+       syscmd("mount --bind /run $targetdir/mnt/hostrun") == 0 ||
+           die "unable to bindmount run on $targetdir/mnt/hostrun\n";
+
        update_progress(1, 0.05, $maxper, "extracting base system");
 
        my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat ($basefile);
@@ -1318,6 +1323,8 @@ sub extract_data {
            die "unable to mount proc on $targetdir/proc\n";
        syscmd("mount -n -t sysfs sysfs $targetdir/sys") == 0 ||
            die "unable to mount sysfs on $targetdir/sys\n";
+       syscmd("chroot $targetdir mount --bind /mnt/hostrun /run") == 0 ||
+           die "unable to re-bindmount hostrun on /run in chroot\n";
 
        update_progress(1, $maxper, 0.5, "configuring base system");
 
@@ -1614,9 +1621,6 @@ _EOD
 
        # cleanup
 
-       # hack: remove dead.letter from sshd installation
-       syscmd("rm -rf $targetdir/dead.letter");
-
        unlink "$targetdir/usr/sbin/policy-rc.d";
 
        diversion_remove($targetdir, "/sbin/start-stop-daemon");
@@ -1678,6 +1682,8 @@ _EOD
        syscmd("chroot $targetdir /usr/bin/dpkg-query -W --showformat='\${package}\n'> final.pkglist");
     }
 
+    syscmd("umount $targetdir/run");
+    syscmd("umount $targetdir/mnt/hostrun");
     syscmd("umount $targetdir/tmp");
     syscmd("umount $targetdir/proc");
     syscmd("umount $targetdir/sys");
@@ -1742,7 +1748,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/;