Skip to content

Commit

Permalink
Identifying centos
Browse files Browse the repository at this point in the history
git-svn-id: http://reductivelabs.com/svn/facter/trunk@88 1f5c1d6a-bddf-0310-8f58-fc49e503516a
  • Loading branch information
luke committed Feb 23, 2006
1 parent cc4a943 commit 2e407d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/facter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,12 @@ def Facter.load
elsif FileTest.exists?("/etc/fedora-release")
"Fedora"
elsif FileTest.exists?("/etc/redhat-release")
"RedHat"
txt = File.read("/etc/redhat-release")
if txt =~ /centos/i
"CentOS"
else
"RedHat"
end
elsif FileTest.exists?("/etc/SuSE-release")
"SuSE"
end
Expand Down

0 comments on commit 2e407d4

Please sign in to comment.