Skip to content

Commit 925c209

Browse files
committed
!fixup: leverage links
1 parent 6e0695b commit 925c209

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

sbin/wifibox

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ has_tap_interface() {
306306
${IFCONFIG} "${WIFIBOX_IF}" 2>&1 | capture_output debug ifconfig
307307
}
308308

309+
get_tap_interface() {
310+
${READLINK} /dev/"${WIFIBOX_IF}"
311+
}
312+
309313
create_tap() {
310314
assert_if_tuntap_loaded
311315

@@ -554,6 +558,7 @@ vm_manager() {
554558
local _max_vmm_cpus
555559
local _nmdm_bhyve
556560
local _passthru_bhyve
561+
local _tap
557562
local _tap_bhyve
558563
local _ppt
559564
local _app_conf
@@ -608,9 +613,10 @@ vm_manager() {
608613
fi
609614

610615
if has_tap_interface; then
611-
_tap_bhyve="-s 5:0,e1000,${WIFIBOX_IF}"
616+
_tap=$(get_tap_interface)
617+
_tap_bhyve="-s 5:0,e1000,${_tap}"
612618
${IFCONFIG} "${WIFIBOX_IF}" up 2>&1 | capture_output debug ifconfig
613-
log info "Tap interface is configured"
619+
log info "Tap interface is configured (${WIFIBOX_IF} -> ${_tap}"
614620
else
615621
log error "No tap interface is available, cannot proceed"
616622
quit_daemonization

0 commit comments

Comments
 (0)