add script to automatically enroll tap device into bridge

This commit is contained in:
mykola2312 2024-09-07 16:57:53 +03:00
parent dcdf248c88
commit 2e5f3ae67f

14
bhyve/enroll-tap.sh Executable file
View file

@ -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