]> git.proxmox.com Git - pve-installer.git/commitdiff
write out install config as json on ack step for debugging
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Jun 2023 10:04:02 +0000 (12:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Jun 2023 10:04:02 +0000 (12:04 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
proxinstall

index 783fe327d24c0545492cab13116c6e9430de4252..b2149d99f29c147092dbe41cd15f44482543c8e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -118,6 +118,7 @@ upload: $(DEB)
 prepare-check-env: test-$(DEB)
        rm -rf testdir
        dpkg -X test-$(DEB) testdir
+       mkdir -p testdir/run/proxmox-installer/
 
 cd-info.test: PRODUCT ?= pve
 cd-info.test:
index f5d7507830faa12e07b8353081dcb05a0b0dc306..19fd81e5c3bd49f574afb5b9188cc9d463d0dbf6 100755 (executable)
@@ -15,6 +15,7 @@ use File::Basename;
 use File::Path;
 use Time::HiRes;
 use POSIX ":sys_wait_h";
+use JSON;
 
 use Proxmox::Log;
 Proxmox::Log::init("/tmp/install.log");
@@ -1679,6 +1680,15 @@ sub create_ack_view {
        $html_data =~ s/$k/$v/g;
     }
 
+    eval {
+       my $config = Proxmox::Install::Config::get();
+       file_write_all(
+           "$iso_env->{locations}->{run}/config-ack.json",
+           to_json($config, { utf8 => 1, canonical => 1 }) ."\n",
+       );
+    };
+    warn "failed to write config-for-ack -  $@" if $@;
+
     file_write_all($ack_html, $html_data);
 
     Proxmox::UI::display_html('ack.htm');