~gandelman-a/ubuntu/precise/facter/merge922788

« back to all changes in this revision

Viewing changes to lib/facter/manufacturer.rb

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20111018103242-ag8i8vejfp8v7b1b
Tags: upstream-1.6.1
ImportĀ upstreamĀ versionĀ 1.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Fact: manufacturer
 
2
#
 
3
# Purpose: Return the hardware manufacturer information about the hardware.
 
4
#
 
5
# Resolution:
 
6
#   On OpenBSD, queries sysctl values, via a util class.
 
7
#   On SunOS Sparc, uses prtdiag via a util class.
 
8
#   On Windows, queries the system via a util class.
 
9
#   Uses the 'util/manufacturer.rb' for fallback parsing.
 
10
#
 
11
# Caveats:
 
12
#
 
13
 
1
14
# manufacturer.rb
2
15
# Facts related to hardware manufacturer
3
16
#
13
26
    }
14
27
 
15
28
    Facter::Manufacturer.sysctl_find_system_info(mfg_keys)
 
29
elsif Facter.value(:kernel) == "Darwin" 
 
30
    mfg_keys = {
 
31
        'hw.model'   => 'productname'
 
32
    }
 
33
    Facter::Manufacturer.sysctl_find_system_info(mfg_keys)
16
34
elsif Facter.value(:kernel) == "SunOS" and Facter.value(:hardwareisa) == "sparc"
17
35
    Facter::Manufacturer.prtdiag_sparc_find_system_info()
18
36
elsif Facter.value(:kernel) == "windows"