From: Thomas Lamprecht Date: Tue, 20 Jun 2023 10:04:02 +0000 (+0200) Subject: write out install config as json on ack step for debugging X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2630cca401f72719f96df5c10a9ed207d9133959;p=pve-installer.git write out install config as json on ack step for debugging Signed-off-by: Thomas Lamprecht --- diff --git a/Makefile b/Makefile index 783fe32..b2149d9 100644 --- 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: diff --git a/proxinstall b/proxinstall index f5d7507..19fd81e 100755 --- a/proxinstall +++ b/proxinstall @@ -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');