parent
6caf3cc70b
commit
5011849e9a
@ -1,110 +0,0 @@
|
||||
From 6360e5a576f7643ac61577abf01110c7d5689afc Mon Sep 17 00:00:00 2001
|
||||
From: Orion Poplawski <orion@cora.nwra.com>
|
||||
Date: Mon, 27 Jun 2011 09:31:31 -0700
|
||||
Subject: [PATCH] (#7682) Added Scientific Linux facts
|
||||
|
||||
Added facts to differentiate Scientific Linux from Redhat.
|
||||
---
|
||||
lib/facter/hardwareisa.rb | 2 +-
|
||||
lib/facter/lsbmajdistrelease.rb | 2 +-
|
||||
lib/facter/macaddress.rb | 2 +-
|
||||
lib/facter/operatingsystemrelease.rb | 4 ++--
|
||||
lib/facter/uniqueid.rb | 2 +-
|
||||
spec/unit/operatingsystemrelease_spec.rb | 17 +++++++++--------
|
||||
6 files changed, 15 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/lib/facter/hardwareisa.rb b/lib/facter/hardwareisa.rb
|
||||
index 9d0830e..87d5391 100644
|
||||
--- a/lib/facter/hardwareisa.rb
|
||||
+++ b/lib/facter/hardwareisa.rb
|
||||
@@ -12,5 +12,5 @@
|
||||
|
||||
Facter.add(:hardwareisa) do
|
||||
setcode 'uname -p', '/bin/sh'
|
||||
- confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE SLES Debian Ubuntu Gentoo FreeBSD OpenBSD NetBSD OEL OVS GNU/kFreeBSD}
|
||||
+ confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS Scientific SuSE SLES Debian Ubuntu Gentoo FreeBSD OpenBSD NetBSD OEL OVS GNU/kFreeBSD}
|
||||
end
|
||||
diff --git a/lib/facter/lsbmajdistrelease.rb b/lib/facter/lsbmajdistrelease.rb
|
||||
index 3659541..4fa68e9 100644
|
||||
--- a/lib/facter/lsbmajdistrelease.rb
|
||||
+++ b/lib/facter/lsbmajdistrelease.rb
|
||||
@@ -15,7 +15,7 @@
|
||||
require 'facter'
|
||||
|
||||
Facter.add("lsbmajdistrelease") do
|
||||
- confine :operatingsystem => %w{Linux Fedora RedHat CentOS SuSE SLES Debian Ubuntu Gentoo OEL OVS GNU/kFreeBSD}
|
||||
+ confine :operatingsystem => %w{Linux Fedora RedHat CentOS Scientific SuSE SLES Debian Ubuntu Gentoo OEL OVS GNU/kFreeBSD}
|
||||
setcode do
|
||||
if /(\d*)\./i =~ Facter.value(:lsbdistrelease)
|
||||
result=$1
|
||||
diff --git a/lib/facter/macaddress.rb b/lib/facter/macaddress.rb
|
||||
index 54c3c84..1e60064 100644
|
||||
--- a/lib/facter/macaddress.rb
|
||||
+++ b/lib/facter/macaddress.rb
|
||||
@@ -10,7 +10,7 @@
|
||||
require 'facter/util/macaddress'
|
||||
|
||||
Facter.add(:macaddress) do
|
||||
- confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE SLES Debian Gentoo Ubuntu OEL OVS GNU/kFreeBSD}
|
||||
+ confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS Scientific SuSE SLES Debian Gentoo Ubuntu OEL OVS GNU/kFreeBSD}
|
||||
setcode do
|
||||
ether = []
|
||||
output = %x{/sbin/ifconfig -a}
|
||||
diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/operatingsystemrelease.rb
|
||||
index 347fe7f..e48330f 100644
|
||||
--- a/lib/facter/operatingsystemrelease.rb
|
||||
+++ b/lib/facter/operatingsystemrelease.rb
|
||||
@@ -16,10 +16,10 @@
|
||||
#
|
||||
|
||||
Facter.add(:operatingsystemrelease) do
|
||||
- confine :operatingsystem => %w{CentOS Fedora oel ovs RedHat MeeGo}
|
||||
+ confine :operatingsystem => %w{CentOS Fedora oel ovs RedHat MeeGo Scientific}
|
||||
setcode do
|
||||
case Facter.value(:operatingsystem)
|
||||
- when "CentOS", "RedHat"
|
||||
+ when "CentOS", "RedHat", "Scientific"
|
||||
releasefile = "/etc/redhat-release"
|
||||
when "Fedora"
|
||||
releasefile = "/etc/fedora-release"
|
||||
diff --git a/lib/facter/uniqueid.rb b/lib/facter/uniqueid.rb
|
||||
index aaeaa12..842d329 100644
|
||||
--- a/lib/facter/uniqueid.rb
|
||||
+++ b/lib/facter/uniqueid.rb
|
||||
@@ -1,4 +1,4 @@
|
||||
Facter.add(:uniqueid) do
|
||||
setcode 'hostid', '/bin/sh'
|
||||
- confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE SLES Debian Ubuntu Gentoo AIX OEL OVS GNU/kFreeBSD}
|
||||
+ confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS Scientific SuSE SLES Debian Ubuntu Gentoo AIX OEL OVS GNU/kFreeBSD}
|
||||
end
|
||||
diff --git a/spec/unit/operatingsystemrelease_spec.rb b/spec/unit/operatingsystemrelease_spec.rb
|
||||
index 739a20a..fb983ce 100755
|
||||
--- a/spec/unit/operatingsystemrelease_spec.rb
|
||||
+++ b/spec/unit/operatingsystemrelease_spec.rb
|
||||
@@ -15,14 +15,15 @@ describe "Operating System Release fact" do
|
||||
end
|
||||
|
||||
test_cases = {
|
||||
- "CentOS" => "/etc/redhat-release",
|
||||
- "RedHat" => "/etc/redhat-release",
|
||||
- "Fedora" => "/etc/fedora-release",
|
||||
- "MeeGo" => "/etc/meego-release",
|
||||
- "OEL" => "/etc/enterprise-release",
|
||||
- "oel" => "/etc/enterprise-release",
|
||||
- "OVS" => "/etc/ovs-release",
|
||||
- "ovs" => "/etc/ovs-release",
|
||||
+ "CentOS" => "/etc/redhat-release",
|
||||
+ "RedHat" => "/etc/redhat-release",
|
||||
+ "Scientific" => "/etc/redhat-release",
|
||||
+ "Fedora" => "/etc/fedora-release",
|
||||
+ "MeeGo" => "/etc/meego-release",
|
||||
+ "OEL" => "/etc/enterprise-release",
|
||||
+ "oel" => "/etc/enterprise-release",
|
||||
+ "OVS" => "/etc/ovs-release",
|
||||
+ "ovs" => "/etc/ovs-release",
|
||||
}
|
||||
|
||||
test_cases.each do |system, file|
|
||||
--
|
||||
1.7.6.rc1
|
||||
|
@ -1,17 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.11 (Darwin)
|
||||
|
||||
iQIcBAABAgAGBQJOA8J8AAoJEBBUt6JL1uwwpaAP/j3Y7wH1ntedvpKZY71USdvC
|
||||
74E0rM5D38ePZ8j5u2Kh4n6rw1oPd8ezXiCIqYOjNDifmqi1ieWd/UPvOSPXlK4a
|
||||
sPMus+N7PNButs3l9rWx5dbvKdLaojSlUhVJQfhBU/PPCPou4W00sTNxchJ07xhR
|
||||
K/CG0WjA0BbahzU7Erz0LnSkiJXidlZln3mURGj5uNnEcAejvT+YwzkXgAT6cNlj
|
||||
DyvE6uTuXD64Tlg/cqkH9IXuJtbSelPPaQKxKjCq6HvfrwOX2J5vW/NVruf4fE5d
|
||||
dFAyC5SQtKC0DEIkYAkqySJR6NpSKYgN16Zys/TIUNsoMzlAepi1hgqeQ/yOYw2K
|
||||
893DRH7Lr6ebjMK3DwmVeSiRMJ3xR6Mvm6Vk+nXK8xFCiSTPldQxOuoKIYufK/eK
|
||||
61ugEWWD7sZo1GHqAQmP1kbzAond0jQCUIvAVBi/CtkVuvhPLQ4/QCpvVLBl30Y3
|
||||
E0edzRkINtVHfTNvYXiFdowSNTBPf6WOhRs3Zw/Ac4n1y/NaWhr74Gn9t6b5ORPi
|
||||
bgUh75iBX06b9UdGzueD0r1eTzeof7fJ6+zffGvmMSTCWp1aAh8Iq6XhbCSAdEqi
|
||||
0BWF84Tizt0QrU5U1BWR4AxlCL7KB6H1WAVt6ESI99c5u+5Mt9SQFIedB30lWSc6
|
||||
+cJfbzSb9VjFW5kKFNZu
|
||||
=ePAN
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,18 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
||||
Comment: GPGTools - http://gpgtools.org
|
||||
|
||||
iQIcBAABAgAGBQJOg7TsAAoJEBBUt6JL1uwwbpQP/35xjO9o1g6a/R0Mf6GhSRE6
|
||||
JG86S7FS0m+ucvNMImB3rh5w22NAPDALocYH4585kT3SZ7v0BZ+W61Up20CL1UH5
|
||||
jWwMJuQ9I1rOev75WUPolwWfxA21piLHpkx1o5P4GgG/KipwBecwhJ/tixAOJEXT
|
||||
Gwx1B/2SUZst706SNncMmVqUro0dgQt1KBhh199qmwVInFX5w3FOZKB4bdtm6PJb
|
||||
c5/2tfboU5oKQem0wv13jlmzFWyJwymPRR/WjQJOUYkaJ9NRZ9xTHXriIUlBVLs1
|
||||
BLZmjVxisBas5xCIlg3uFRmN/wJTqs7iVZ36Dd2CF7I6XZmR1gPIlFxe3w0zPGp7
|
||||
klvxvjd1lYt/0cpA1VypbJMHRecTLwav43tkDg+3WtDhCpudUe23lHzO40u45AzL
|
||||
djy/yfi/pYcO268q3WZ29Jil5etci2PpO1sq2LIANANfYW0nldLQLRu4Z0KuAs5v
|
||||
xhuFIs4rRBBQMUKfvdpdtgq+Tv7KIaPIIeXKY24/Q0OufGgQyGugy1l59yCbK8iF
|
||||
Cp2VyINEC8C1Yg69qYc7Mv380/MzC5TOVU5W76yAzh8w/KKsT/TIuVSDXlya+tw/
|
||||
azli7DGWs+osGv6naWan2RnstMXjV8FTf0pRu86W86HGjw6PD9GxUb0Txv2x8KNi
|
||||
RaGBrnZNjcITh9mNNlOo
|
||||
=ZKmE
|
||||
-----END PGP SIGNATURE-----
|
Loading…
Reference in new issue