From a3e647985f2c429c06613eedaf7824ff7cba5484 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 14 Aug 2018 16:54:25 -0400 Subject: osi-run: Fix quoting --- osi-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osi-run b/osi-run index c357410..c39e3b4 100755 --- a/osi-run +++ b/osi-run @@ -63,11 +63,11 @@ main() { main) arg_mountpoint=$(mktemp -dt -- "${0##*/}.XXXXXXXXXX") trap "rmdir -- ${arg_mountpoint@Q}" EXIT - sudo -- ./osi-mount --root -- "$arg_image" "$arg_mountpoint" "install -Dm755 /dev/stdin ${arg_mountpoint@Q}/etc/osi-run" + sudo -- ./osi-mount --root -- "$arg_image" "$arg_mountpoint" install -Dm755 /dev/stdin "$arg_mountpoint/etc/osi-run" "${arg_qemu[@]}" \ -name "osi-run $arg_image" \ -drive media=disk,format=raw,if=virtio,file="$arg_image" - sudo -- ./osi-mount --user -- "cat ${arg_mountpoint@Q}/var/log/osi-run.out; exit \$(cat ${arg_mountpoint@Q}/var/log/osi-run.status)" + sudo -- ./osi-mount --user -- "$arg_image" "$arg_mountpoint" sh -c "cat ${arg_mountpoint@Q}/var/log/osi-run.out; exit \$(cat ${arg_mountpoint@Q}/var/log/osi-run.status)" ;; *) error 1 'Internal error. The programmer writing this tool screwed up.';; -- cgit v1.2.2