diff options
| author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-14 20:25:20 (GMT) |
|---|---|---|
| committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-14 20:25:20 (GMT) |
| commit | 812d04661b379285c0220b456654802abb20251b (patch) | |
| tree | 192af19b4c9aac1fedf94ec7b12ee81dac582372 | |
| parent | 3bee40471e5171a48cdb936cccc86dfd23a1e532 (diff) | |
ssh: Filter out trailing spaces from commands in auxverb
The printf "%q" turns that into a trailing "\ " which ssh reduces to "\" which
bash 4.4 trips over (earlier versions were fine).
| -rwxr-xr-x | virt/autopkgtest-virt-ssh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/autopkgtest-virt-ssh b/virt/autopkgtest-virt-ssh index 485dbe8..a065186 100755 --- a/virt/autopkgtest-virt-ssh +++ b/virt/autopkgtest-virt-ssh @@ -343,7 +343,7 @@ def build_auxverb(): auxverb = os.path.join(workdir, 'runcmd') with open(auxverb, 'w') as f: f.write('''#!/bin/bash -exec %s -- %s /tmp/autopkgtest-run-wrapper $(printf '%%q ' "$@") +exec %s -- %s /tmp/autopkgtest-run-wrapper $(printf '%%q ' "${@%% }") ''' % (" ".join(sshcmd), sudocmd or '')) os.chmod(auxverb, 0o755) VirtSubproc.auxverb = [auxverb] |
