From 5f4939c9e6df3cff66f76e149c94f5f18b6517c6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 29 May 2023 17:41:02 -0400 Subject: [PATCH] Add support for raw bridging to an external interface for bhyve. --- .../bhyve/files/bhyve_netgraph_bridge.bash | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/ansible/roles/bhyve/files/bhyve_netgraph_bridge.bash b/ansible/roles/bhyve/files/bhyve_netgraph_bridge.bash index fdf8013..8760c30 100644 --- a/ansible/roles/bhyve/files/bhyve_netgraph_bridge.bash +++ b/ansible/roles/bhyve/files/bhyve_netgraph_bridge.bash @@ -34,6 +34,13 @@ function main { fi } +function die { + local status_code="$1" + shift + (>&2 echo "${@}") + exit "$status_code" +} + function create_disk { zfs_path="$1" mount_path="$2" @@ -43,6 +50,7 @@ function create_disk { tee "${mount_path}/settings" </dev/null 2>&1 }