[! use strict; use Proxmox::Utils; use Proxmox::HTMLTable; use Proxmox::HTMLDropDown; use Proxmox::HTMLControls; use Proxmox::Form; use Proxmox::ConfigServer; use Proxmox::License; !] [- my $system_cfg = $fdat{__system_config}; my $lic = $system_cfg->{license}; if ($lic->no_update()) { my $msg = $lic->no_update(); my $out = "
" . __("Unsupported feature!") . "
$msg
"; print OUT $out; return; } my $frm = Proxmox::Form->new (\%fdat); $frm->set_style("normal wide"); $frm->add_element('File', "file", '', __('Upload Servicepack') . ':', ''); if ($frm->submit == 1) { if ($udat{AM} eq 'w') { if ($fdat{File} !~ m/^\s*$/) { my $buffer = ""; my $filename = "/tmp/proxmox_update-$$.bin"; open FILE, ">$filename"; print FILE $buffer while read($fdat{File}, $buffer, 32768); close FILE; my $conn = Proxmox::ConfigClient::connect (); eval { $conn->update("$filename"); }; unlink $filename; $udat{popup_error} = $@ if ($@); } } else { $udat{popup_error} = Proxmox::Utils::msg ('nowr'); } } my $out = $frm->out_form . "