wait_booted(): pass the await-boot script to stdin of sh -s

Pass the await-boot script to stdin of sh -s instead of passing it as a string to sh -c. The problem with the sh -c approach is that we don't know how exec_command will treat quoted strings. In particular this is problematic with ssh (and thus with autopkgtest-virt-ssh); idiosyncrasies of ssh quoting are well explained in [1]. Passing the script to execute via stdin removes this problem.

Passing await-boot.sh contents via stdin to sh -s is what we do already in build-lxc.sh and build-lxd.sh.

[1] https://www.chiark.greenend.org.uk/~cjwatson/blog/ssh-quoting.html

Merge request reports

Loading