Skip to content

Commit

Permalink
update IsLikeTraditionalRHEL7() to account for minor versions
Browse files Browse the repository at this point in the history
This function was erroneously returning false when the version
has a minor version (for ex:7.5). Update to return true
when major version is 7.
  • Loading branch information
kikisdeliveryservice committed Jan 11, 2021
1 parent 24be1e4 commit 95c9d83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/daemon/osrelease.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (os OperatingSystem) IsCoreOSVariant() bool {
// yum based + kickstart/cloud-init (not Ignition).
func (os OperatingSystem) IsLikeTraditionalRHEL7() bool {
// Today nothing else is going to show up with a version ID of 7
if len(os.VersionID) > 2 {
return strings.HasPrefix(os.VersionID, "7.")
}
return os.VersionID == "7"
}

Expand Down

0 comments on commit 95c9d83

Please sign in to comment.