control/controlclient, version/distro, wgengine: recognize OpenWrt

And help out with missing packages.

Thanks to @willangley for tips.

Updates #724
This commit is contained in:
Brad Fitzpatrick
2020-09-22 10:28:40 -07:00
parent ec95e901e6
commit 5d8b88be88
3 changed files with 24 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ const (
Debian = Distro("debian")
Arch = Distro("arch")
Synology = Distro("synology")
OpenWrt = Distro("openwrt")
)
// Get returns the current distro, or the empty string if unknown.
@@ -36,5 +37,8 @@ func linuxDistro() Distro {
if _, err := os.Stat("/etc/arch-release"); err == nil {
return Arch
}
if _, err := os.Stat("/etc/openwrt_version"); err == nil {
return OpenWrt
}
return ""
}