fix shell quoting for upgrade command

This commit is contained in:
Dietmar Maurer 2013-06-24 08:02:32 +02:00
parent 8cfd96ad45
commit ea5eb43003

View File

@ -631,7 +631,9 @@ __PACKAGE__->register_method ({
if ($user eq 'root@pam') {
if ($param->{upgrade}) {
$shcmd = [ '/bin/bash', '-c', '"pveupgrade --shell"' ];
my $upgradecmd = "pveupgrade --shell";
$upgradecmd = PVE::Tools::shellquote($upgradecmd) if $remip;
$shcmd = [ '/bin/bash', '-c', $upgradecmd ];
} else {
$shcmd = [ '/bin/bash', '-l' ];
}