So that both VMID and state related checks are grouped together.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
my $vmid = $param->{vmid};
PVE::LXC::Config->load_config($vmid); # test if container exists on this node
-
- if (!@{$param->{'extra-args'}}) {
- die "missing command";
- }
die "Error: container '$vmid' not running!\n" if !PVE::LXC::check_running($vmid);
+ die "missing command" if !@{$param->{'extra-args'}};
+
exec('lxc-attach', '-n', $vmid, '--', @{$param->{'extra-args'}});
}});