diff --git a/man/wifibox.8 b/man/wifibox.8 index 3b9c170..0c9a84c 100644 --- a/man/wifibox.8 +++ b/man/wifibox.8 @@ -1,4 +1,4 @@ -.Dd August 6, 2021 +.Dd August 8, 2021 .Dt WIFIBOX 8 .Os .Sh NAME @@ -135,10 +135,12 @@ kernel module and restarting the guest. .It Cm console Attach to the running guest with .Xr cu 1 -through a virtual serial port. This is recommended for -troubleshooting problems with the guest in an interactive fashion. It -can also be used to perform updates, install or remove packages. This -has to be configured specifically in order to work. +through a virtual serial port, implemented by +.Xr nmdm 4 . +This is recommended for troubleshooting problems with the guest in an +interactive fashion. It can also be used to perform updates, install +or remove packages. This has to be configured specifically in order +to work. .It Cm version Display version of .Nm @@ -173,7 +175,8 @@ The exit status is 0 on success, and >0 if any of the commands fail. .Xr resolv.conf 5 , .Xr devd.conf 5 , .Xr devd 8 , -.Xr cu 1 +.Xr cu 1 , +.Xr nmdm 4 .Sh CAVEATS .Nm supports only a single wireless network device at a time, and it has diff --git a/sbin/wifibox b/sbin/wifibox index a3c5b09..28c1e58 100755 --- a/sbin/wifibox +++ b/sbin/wifibox @@ -52,9 +52,11 @@ sysctl_value() { ${SYSCTL} -nq "$1" } -check_vmm() { - if ! ${KLDSTAT} -q -m vmm; then - ${ECHO} "ERROR: vmm.ko is not loaded." +check_kmod() { + local _kmod="$1" + + if ! ${KLDSTAT} -q -m ${_kmod}; then + ${ECHO} "ERROR: ${_kmod}.ko is not loaded." exit 127 fi } @@ -74,7 +76,7 @@ check_iommu() { } assert_vm_can_run() { - check_vmm + check_kmod "vmm" check_iommu check_virtfs } @@ -111,6 +113,8 @@ create_nmdm() { [ "${console}" != "yes" ] && return 0 + check_kmod "nmdm" + [ ! -c ${NMDM_A} ] && ${MKNOD} ${NMDM_A} [ ! -c ${NMDM_B} ] && ${MKNOD} ${NMDM_B} }