mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 02:50:42 +00:00
all: detect JetKVM and specialize a handful of things for it
Updates #16524 Change-Id: I183428de8c65d7155d82979d2d33f031c22e3331 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
bebc796e6c
commit
fbc6a9ec5a
@@ -17,6 +17,14 @@ import (
|
||||
|
||||
func init() {
|
||||
tunDiagnoseFailure = diagnoseLinuxTUNFailure
|
||||
modprobeTunHook.Set(func() error {
|
||||
_, err := modprobeTun()
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
func modprobeTun() ([]byte, error) {
|
||||
return exec.Command("/sbin/modprobe", "tun").CombinedOutput()
|
||||
}
|
||||
|
||||
func diagnoseLinuxTUNFailure(tunName string, logf logger.Logf, createErr error) {
|
||||
@@ -36,7 +44,7 @@ func diagnoseLinuxTUNFailure(tunName string, logf logger.Logf, createErr error)
|
||||
kernel := utsReleaseField(&un)
|
||||
logf("Linux kernel version: %s", kernel)
|
||||
|
||||
modprobeOut, err := exec.Command("/sbin/modprobe", "tun").CombinedOutput()
|
||||
modprobeOut, err := modprobeTun()
|
||||
if err == nil {
|
||||
logf("'modprobe tun' successful")
|
||||
// Either tun is currently loaded, or it's statically
|
||||
|
Reference in New Issue
Block a user