Skip to content

Commit

Permalink
Merge pull request #21 from redBorder/development
Browse files Browse the repository at this point in the history
Release 1.5.0
  • Loading branch information
manegron authored Oct 23, 2024
2 parents c06a8e0 + eae4bf9 commit 08ef9ce
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.5.0
29 changes: 29 additions & 0 deletions resources/ohai/plugins/redborder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
r = /(snort|barnyard2)-(.*)\.(x86_64)/
m = r.match(line.chomp)
next unless m

if m[1] == "snort"
redborder[:snort] = Mash.new
redborder[:snort][:version] = m[2].gsub(".el9", "")
Expand All @@ -37,6 +38,34 @@
end
end

# get webui version
if redborder[:is_manager]
rpms = shell_out('rpm -qa | grep -E "(redborder-webui-)"').stdout
rpms.each_line do |line|
r = /(redborder-webui)-(.*)\.(noarch)/
m = r.match(line.chomp)
next unless m

if m[1] == "redborder-webui"
redborder[:webui] = Mash.new
redborder[:webui][:version] = m[2].gsub(".el9.rb", "")
end
end
end

# get repo version
rpms = shell_out('rpm -qa | grep -E "(redborder-repo-)"').stdout
rpms.each_line do |line|
r = /(redborder-repo)-(.*)\.(noarch)/
m = r.match(line.chomp)
next unless m

if m[1] == "redborder-repo"
redborder[:repo] = Mash.new
redborder[:repo][:version] = m[2].gsub(".el9.rb", "")
end
end

redborder[:dmidecode] = Mash.new
redborder[:dmidecode][:manufacturer] = shell_out('dmidecode -t 1 | grep "Manufacturer:" | sed "s/.*Manufacturer: //"').stdout.chomp
redborder[:dmidecode][:product_name] = shell_out('dmidecode -t 1 | grep "Product Name:" | sed "s/.*Product Name: //"').stdout.chomp
Expand Down

0 comments on commit 08ef9ce

Please sign in to comment.