diff options
author | Paul Nasrat <pnasrat@googlemail.com> | 2009-05-06 08:14:37 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-05-12 10:04:55 +1000 |
commit | a6adf59ec4683af8dea9af1f8a457cb5a1ae178b (patch) | |
tree | d120c39b866394d613774ab1c24a211fb240539e /lib | |
parent | e101faf209aa2a0ddd6d1d6598e8d243f43386e7 (diff) | |
download | facter-a6adf59ec4683af8dea9af1f8a457cb5a1ae178b.tar.gz facter-a6adf59ec4683af8dea9af1f8a457cb5a1ae178b.tar.xz facter-a6adf59ec4683af8dea9af1f8a457cb5a1ae178b.zip |
Facter ticket 2214 - Fix facts for OVS
Added tests for operatingsystem fact covering the two simple cases and a test
for this specific interaction of release files
We should take some time to add tests when we're adding or changing new
operatingsystem facts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/operatingsystem.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb index 704b48f..335003a 100644 --- a/lib/facter/operatingsystem.rb +++ b/lib/facter/operatingsystem.rb @@ -23,9 +23,11 @@ Facter.add(:operatingsystem) do elsif FileTest.exists?("/etc/arch-release") "Archlinux" elsif FileTest.exists?("/etc/enterprise-release") - "OEL" - elsif FileTest.exists?("/etc/ovs-release") - "OVS" + if FileTest.exists?("/etc/ovs-release") + "OVS" + else + "OEL" + end elsif FileTest.exists?("/etc/arch-release") "Arch" elsif FileTest.exists?("/etc/redhat-release") |