[pve-devel] run_command and shellquote

Michael Rasmussen mir at datanom.net
Mon Nov 3 20:01:01 CET 2014


On Mon, 3 Nov 2014 05:00:59 +0000
Dietmar Maurer <dietmar at proxmox.com> wrote:

> 
> Why does shell quoting make the command fail? I thought shell quoting should not have any effect on
> how the command receives parameters?
> 
This is the particular code:
my @ssh_opts = ('-o', 'BatchMode=yes');
my @ssh_cmd = ('/usr/bin/ssh', @ssh_opts);
....

my @params = ('set', "refreservation=$size", $path);
my $target = 'root@' . $scfg->{portal};
my $cmd = [@ssh_cmd, '-i', "$id_rsa_path/$scfg->{portal}_id_rsa",
$target, 'zfs', @params];

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
My weight is perfect for my height -- which varies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20141103/641d0a63/attachment.sig>


More information about the pve-devel mailing list