Skip to content

Commit ecd57ba

Browse files
authored
Remove support for ubios detection (#6046)
This was a shortlived name that existed on the Ubiquiti Dream Machine products before they released their 2.x and later revisions that just rolled Debian Linux. I added it in 2022 and I'm sure no one but me ever tried it. Let's remove this unused OS. Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 96bae01 commit ecd57ba

File tree

3 files changed

+1
-42
lines changed

3 files changed

+1
-42
lines changed

providers/os/detector/detector_all.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -584,17 +584,6 @@ var gentoo = &PlatformResolver{
584584
},
585585
}
586586

587-
var ubios = &PlatformResolver{
588-
Name: "ubios",
589-
IsFamily: false,
590-
Detect: func(r *PlatformResolver, pf *inventory.Platform, conn shared.Connection) (bool, error) {
591-
if pf.Name == "ubios" {
592-
return true, nil
593-
}
594-
return false, nil
595-
},
596-
}
597-
598587
var busybox = &PlatformResolver{
599588
Name: "busybox",
600589
IsFamily: false,
@@ -1054,7 +1043,7 @@ var eulerFamily = &PlatformResolver{
10541043
var linuxFamily = &PlatformResolver{
10551044
Name: inventory.FAMILY_LINUX,
10561045
IsFamily: true,
1057-
Children: []*PlatformResolver{archFamily, redhatFamily, debianFamily, suseFamily, eulerFamily, bottlerocket, amazonlinux, alpine, gentoo, busybox, photon, windriver, openwrt, ubios, plcnext, mageia, azurelinux, flatcar, defaultLinux},
1046+
Children: []*PlatformResolver{archFamily, redhatFamily, debianFamily, suseFamily, eulerFamily, bottlerocket, amazonlinux, alpine, gentoo, busybox, photon, windriver, openwrt, plcnext, mageia, azurelinux, flatcar, defaultLinux},
10581047
Detect: func(r *PlatformResolver, pf *inventory.Platform, conn shared.Connection) (bool, error) {
10591048
detected := false
10601049
osrd := NewOSReleaseDetector(conn)

providers/os/detector/detector_platform_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -867,17 +867,6 @@ func TestGoogleCOSDetector(t *testing.T) {
867867
assert.Equal(t, []string{"linux", "unix", "os"}, di.Family)
868868
}
869869

870-
func TestUbiOSDetector(t *testing.T) {
871-
di, err := detectPlatformFromMock("./testdata/detect-ubios.toml")
872-
assert.Nil(t, err, "was able to create the provider")
873-
874-
assert.Equal(t, "ubios", di.Name, "os name should be identified")
875-
assert.Equal(t, "UbiOS 1.12.24.4315", di.Title, "os title should be identified")
876-
assert.Equal(t, "v1.12.24.4315-136ee7c", di.Version, "os version should be identified")
877-
assert.Equal(t, "aarch64", di.Arch, "os arch should be identified")
878-
assert.Equal(t, []string{"linux", "unix", "os"}, di.Family)
879-
}
880-
881870
func TestElementaryOSDetector(t *testing.T) {
882871
di, err := detectPlatformFromMock("./testdata/detect-elementary.toml")
883872
assert.Nil(t, err, "was able to create the provider")

providers/os/detector/testdata/detect-ubios.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)