summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper')
-rwxr-xr-xmeta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper
new file mode 100755
index 0000000000..f057d4eef0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper
@@ -0,0 +1,25 @@
1#! /bin/sh
2# Copyright 2020 Garmin Ltd. or its subsidiaries
3#
4# SPDX-License-Identifier: GPL-2.0
5#
6# Attempts to find and exec the host qemu-bridge-helper program
7
8# If the QEMU_BRIDGE_HELPER variable is set by the user, exec it.
9if [ -n "$QEMU_BRIDGE_HELPER" ]; then
10 exec "$QEMU_BRIDGE_HELPER" "$@"
11fi
12
13# Search common paths for the helper program
14BN="qemu-bridge-helper"
15PATHS="/usr/libexec/ /usr/lib/qemu/"
16
17for p in $PATHS; do
18 if [ -e "$p/$BN" ]; then
19 exec "$p/$BN" "$@"
20 fi
21done
22
23echo "$BN not found!" > /dev/stderr
24exit 1
25