summaryrefslogtreecommitdiffstats
path: root/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in')
-rwxr-xr-xbsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in
new file mode 100755
index 00000000..2a360964
--- /dev/null
+++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in
@@ -0,0 +1,15 @@
+#!/bin/sh
+# This script is setting up a virtual network interface connected to the
+# xenguest-network-bridge if NETWORK_BRIDGE is set to 1 in the guest params
+
+guestname="${1}"
+
+BRIDGE_NAME="###BRIDGE_NAME###"
+
+# get guest parameters
+. ./params.cfg
+
+if [ "${NETWORK_BRIDGE:-}" = "1" ]; then
+ echo "vif = ['${BRIDGE_NAME}']" >> ${guestname}.cfg
+fi
+