From 2e5f3ae67fd643afc7007586b92a0fbca0bbd6ef Mon Sep 17 00:00:00 2001 From: mykola2312 <49044616+mykola2312@users.noreply.github.com> Date: Sat, 7 Sep 2024 16:57:53 +0300 Subject: [PATCH] add script to automatically enroll tap device into bridge --- bhyve/enroll-tap.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bhyve/enroll-tap.sh diff --git a/bhyve/enroll-tap.sh b/bhyve/enroll-tap.sh new file mode 100755 index 0000000..de39b98 --- /dev/null +++ b/bhyve/enroll-tap.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +bridge=$1 +tap=$2 + +while true; do + ifconfig $tap + if [ $? -eq 0 ]; then + ifconfig $bridge addm $tap + break + fi + + sleep 1 +done