[pve-devel] [PATCH manager v2] quote the upgradecmd for xtermjs

Dominik Csapak d.csapak at proxmox.com
Wed Jan 17 09:19:23 CET 2018


this was missing and led to 'connection closed' after upgrading
a remote host via xtermjs

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/API2/Nodes.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index f11fd169..f7036531 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -822,8 +822,7 @@ __PACKAGE__->register_method ({
 
 	if ($user eq 'root at pam') {
 	    if ($param->{upgrade}) {
-		my $upgradecmd = "pveupgrade --shell";
-		$concmd = [ '/bin/bash', '-c', $upgradecmd ];
+		$concmd = [ '/bin/bash', '-c', '"pveupgrade --shell"' ];
 	    } else {
 		$concmd = [ '/bin/login', '-f', 'root' ];
 	    }
-- 
2.11.0





More information about the pve-devel mailing list