mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
hostinfo,distro: Identify Western Digital MyCloud devices.
root@WDMyCloud HD_a2 # ./tailscale debug hostinfo { "IPNVersion": "1.25.0-dev20220605-t7fea52e02", "OS": "linux", "OSVersion": "5.22.113", "Desktop": false, "DeviceModel": "WD My Cloud Gen2: Marvell Armada 375", "Hostname": "WDMyCloud", "GoArch": "arm" } Updates https://github.com/tailscale/tailscale/issues/4622 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:

committed by
Denton Gentry

parent
0687195bee
commit
c6ac82e3a6
@@ -14,16 +14,17 @@ import (
|
||||
type Distro string
|
||||
|
||||
const (
|
||||
Debian = Distro("debian")
|
||||
Arch = Distro("arch")
|
||||
Synology = Distro("synology")
|
||||
OpenWrt = Distro("openwrt")
|
||||
NixOS = Distro("nixos")
|
||||
QNAP = Distro("qnap")
|
||||
Pfsense = Distro("pfsense")
|
||||
OPNsense = Distro("opnsense")
|
||||
TrueNAS = Distro("truenas")
|
||||
Gokrazy = Distro("gokrazy")
|
||||
Debian = Distro("debian")
|
||||
Arch = Distro("arch")
|
||||
Synology = Distro("synology")
|
||||
OpenWrt = Distro("openwrt")
|
||||
NixOS = Distro("nixos")
|
||||
QNAP = Distro("qnap")
|
||||
Pfsense = Distro("pfsense")
|
||||
OPNsense = Distro("opnsense")
|
||||
TrueNAS = Distro("truenas")
|
||||
Gokrazy = Distro("gokrazy")
|
||||
WDMyCloud = Distro("wdmycloud")
|
||||
)
|
||||
|
||||
var distroAtomic atomic.Value // of Distro
|
||||
@@ -73,6 +74,10 @@ func linuxDistro() Distro {
|
||||
return QNAP
|
||||
case haveDir("/gokrazy"):
|
||||
return Gokrazy
|
||||
case have("/usr/local/wdmcserver/bin/wdmc.xml"): // Western Digital MyCloud OS3
|
||||
return WDMyCloud
|
||||
case have("/usr/sbin/wd_crontab.sh"): // Western Digital MyCloud OS5
|
||||
return WDMyCloud
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user