cmd/tailscale/cli,version/distro: update support for Alpine (#8701)

Similar to Arch support, use the latest version info from the official
`apk` repo and don't offer explicit track or version switching.
Add detection for Alpine Linux in version/distro along the way.

Updates #6995

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2023-07-24 16:53:15 -07:00
committed by GitHub
parent 6afffece8a
commit 306deea03a
3 changed files with 140 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ const (
Gokrazy = Distro("gokrazy")
WDMyCloud = Distro("wdmycloud")
Unraid = Distro("unraid")
Alpine = Distro("alpine")
)
var distro lazy.SyncValue[Distro]
@@ -93,6 +94,8 @@ func linuxDistro() Distro {
return WDMyCloud
case have("/etc/unraid-version"):
return Unraid
case have("/etc/alpine-release"):
return Alpine
}
return ""
}