add script to automatically enroll tap device into bridge
This commit is contained in:
parent
dcdf248c88
commit
2e5f3ae67f
1 changed files with 14 additions and 0 deletions
14
bhyve/enroll-tap.sh
Executable file
14
bhyve/enroll-tap.sh
Executable 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
|
||||
Loading…
Add table
Reference in a new issue