Skip to content

Commit

Permalink
Don't confuse libvirt with the oc hack
Browse files Browse the repository at this point in the history
If exec is missing libvirt kills the nested sh script instead of the
domain.

Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed Apr 9, 2018
1 parent eeb8655 commit 5e08d8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/virt-launcher/sh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ args="$@"
if [ "$args" = "-i -c TERM=xterm /bin/sh" ] ; then
namespace="$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)"
name="$(ls /var/run/kubevirt-private/${namespace}/)"
/usr/bin/sh.orig -c "/sock-connector /var/run/kubevirt-private/${namespace}/${name}/virt-serial0"
exec /usr/bin/sh.orig -c "/sock-connector /var/run/kubevirt-private/${namespace}/${name}/virt-serial0"
else
/usr/bin/sh.orig "$@"
exec /usr/bin/sh.orig "$@"
fi

0 comments on commit 5e08d8e

Please sign in to comment.