properties => {
node => get_standard_option('pve-node'),
proxy => get_standard_option('spice-proxy', { optional => 1 }),
- upgrade => {
- type => 'boolean',
- description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
- optional => 1,
- default => 0,
- },
cmd => {
type => 'string',
description => "Run specific command or default to login.",
my ($user, undef, $realm) = PVE::AccessControl::verify_username($authuser);
raise_perm_exc("realm != pam") if $realm ne 'pam';
- raise_perm_exc('user != root@pam') if $param->{upgrade} && $user ne 'root@pam';
+
+ if (defined($param->{cmd}) && $param->{cmd} eq 'upgrade' && $user ne 'root@pam') {
+ raise_perm_exc('user != root@pam');
+ }
my $node = $param->{node};
my $proxy = $param->{proxy};
my $authpath = "/nodes/$node";
my $permissions = 'Sys.Console';
- # FIXME: remove with 6.0
- if ($param->{upgrade}) {
- $param->{cmd} = 'upgrade';
- }
+
my $shcmd = get_shell_command($user, $param->{cmd}, $param->{'cmd-opts'});
my $title = "Shell on '$node'";