summaryrefslogtreecommitdiffstats
path: root/lib/facter/kernel.rb
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-05-17 00:32:34 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-05-17 00:32:34 +1000
commite02b0b386ed84384daeb2da0879bf215cfcfa2ef (patch)
tree36cdd5c3cc6143ce6faccb87ba6461bf5f481a29 /lib/facter/kernel.rb
parent9c91a6d3fb9da933d8e1ba4149ee1b5587e6b007 (diff)
downloadfacter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.tar.gz
facter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.tar.xz
facter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.zip
Updated version. Moved most facts to seperate files.
Diffstat (limited to 'lib/facter/kernel.rb')
-rw-r--r--lib/facter/kernel.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/facter/kernel.rb b/lib/facter/kernel.rb
index 68f887a..4a453c3 100644
--- a/lib/facter/kernel.rb
+++ b/lib/facter/kernel.rb
@@ -1,46 +1,3 @@
-## kernel.rb
-## Facts related to the kernel, architecture and related
-##
-## This program is free software; you can redistribute it and/or
-## modify it under the terms of the GNU General Public License
-## as published by the Free Software Foundation (version 2 of the License)
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA
-##
-
Facter.add(:kernel) do
setcode 'uname -s'
end
-
- Facter.add(:kernelrelease) do
- setcode 'uname -r'
- end
-
- Facter.add(:hardwaremodel) do
- setcode 'uname -m'
- end
-
- Facter.add(:architecture) do
- confine :kernel => :linux
- setcode do
- model = Facter.value(:hardwaremodel)
- case model
- # most linuxen use "x86_64"
- when 'x86_64':
- Facter.value(:operatingsystem) == "Debian" ? "amd64" : model;
- when /(i[3456]86|pentium)/: "i386"
- else
- model
- end
- end
- end
-
- Facter.add(:hardwareisa) do
- setcode 'uname -p', '/bin/sh'
- confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE Debian Gentoo FreeBSD OpenBSD NetBSD}
- end