Skip to content

Commit

Permalink
Fix CentOS 7 support and install dnf
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrendek committed Oct 8, 2023
1 parent c42339e commit 71690e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions operating_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ func checkPreReqs() {
}

} else if agent.linux == "centos" {
if !fileReader.FileExists("/usr/bin/dnf") {
fmt.Println("dnf not found, installing")
out, err := runner.Run("yum", "install", "-y", "dnf")
if err != nil {
panic(err)
}
logging.LogMsg(out)
}

if !fileReader.FileExists("/usr/bin/needs-restarting") {
fmt.Println("needs-restarting not found, installing")
Expand Down

0 comments on commit 71690e2

Please sign in to comment.