Compare commits

...

1 Commits

Author SHA1 Message Date
Denton Gentry
c99284bc33 version/distro: identify iStoreOS as a distro.
A NAS system based on OpenWRT: https://www.istoreos.com/

Updates https://github.com/tailscale/corp/issues/14033

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2023-09-26 19:56:39 -07:00
2 changed files with 6 additions and 1 deletions

View File

@@ -95,6 +95,8 @@ func linuxVersionMeta() (meta versionMeta) {
propFile = "/etc.defaults/VERSION"
case distro.OpenWrt:
propFile = "/etc/openwrt_release"
case distro.IStoreOS:
propFile = "/etc/openwrt_release"
case distro.Unraid:
propFile = "/etc/unraid-version"
case distro.WDMyCloud:
@@ -153,7 +155,7 @@ func linuxVersionMeta() (meta versionMeta) {
switch dist {
case distro.Synology:
meta.DistroVersion = m["productversion"]
case distro.OpenWrt:
case distro.OpenWrt, distro.IStoreOS:
meta.DistroVersion = m["DISTRIB_RELEASE"]
case distro.Unraid:
meta.DistroVersion = m["version"]

View File

@@ -31,6 +31,7 @@ const (
WDMyCloud = Distro("wdmycloud")
Unraid = Distro("unraid")
Alpine = Distro("alpine")
IStoreOS = Distro("istoreos")
)
var distro lazy.SyncValue[Distro]
@@ -96,6 +97,8 @@ func linuxDistro() Distro {
return Unraid
case have("/etc/alpine-release"):
return Alpine
case have("/usr/libexec/istore"):
return IStoreOS
}
return ""
}