The termproxy api was adapted to the changes from PVE and PBS
in
d9e79ff4b7f0f9b2c49f06484091546353980c5e
We can now drop the 'upgrade' option kept for backwards compatibility
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
- upgrade => {
- type => 'boolean',
- description => "Run 'apt-get dist-upgrade' instead of normal shell.",
- optional => 1,
- default => 0,
- },
cmd => {
type => 'string',
description => "Run specific command or default to login.",
cmd => {
type => 'string',
description => "Run specific command or default to login.",
my $restenv = PMG::RESTEnvironment->get();
my $user = $restenv->get_user();
my $restenv = PMG::RESTEnvironment->get();
my $user = $restenv->get_user();
- raise_perm_exc('user != root@pam') if $param->{upgrade} && $user ne 'root@pam';
+ raise_perm_exc('user != root@pam') if $param->{cmd} eq 'upgrade' && $user ne 'root@pam';
my $ticket = PMG::Ticket::assemble_vnc_ticket($user, $authpath);
my $family = PVE::Tools::get_host_address_family($node);
my $port = PVE::Tools::next_vnc_port($family);
my $ticket = PMG::Ticket::assemble_vnc_ticket($user, $authpath);
my $family = PVE::Tools::get_host_address_family($node);
my $port = PVE::Tools::next_vnc_port($family);
- # FIXME: remove with 7.0 (check if all works before!!)
- if ($param->{upgrade}) {
- $param->{cmd} = 'upgrade';
- }
my $shcmd = get_shell_command($user, $param->{cmd}, $param->{'cmd-opts'});
my $cmd = ['/usr/bin/termproxy', $port, '--path', $authpath, '--', @$shcmd];
my $shcmd = get_shell_command($user, $param->{cmd}, $param->{'cmd-opts'});
my $cmd = ['/usr/bin/termproxy', $port, '--path', $authpath, '--', @$shcmd];