hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
# Copyright 2020 Garmin Ltd. or its subsidiaries
#
# SPDX-License-Identifier: GPL-2.0
#
# Attempts to find and exec the host qemu-bridge-helper program
 
# If the QEMU_BRIDGE_HELPER variable is set by the user, exec it.
if [ -n "$QEMU_BRIDGE_HELPER" ]; then
    exec "$QEMU_BRIDGE_HELPER" "$@"
fi
 
# Search common paths for the helper program
BN="qemu-bridge-helper"
PATHS="/usr/libexec/ /usr/lib/qemu/"
 
for p in $PATHS; do
    if [ -e "$p/$BN" ]; then
        exec "$p/$BN" "$@"
    fi
done
 
echo "$BN not found!" > /dev/stderr
exit 1