File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
hanlon_microkernel/facter Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 23
23
lines = definition . split ( /\n / )
24
24
# section title is on the first line
25
25
cpu = lines . shift . tr ( ':' , '' )
26
- cpus += 1
27
- # Create a hash of attributes for each section (i.e. cpu)
28
- attribs = Hash [ lines . collect { |l | l =~ /^\s *([^:]+):\s +(.*)\s *$/ ; v = $2; [ $1. gsub ( /\s / , '_' ) , v ] } ]
29
- attribs . each_pair do |attrib , val |
30
- Facter . add ( "mk_hw_#{ cpu } _#{ attrib } " ) do
31
- setcode { val }
26
+ unless cpu =~ /disabled/i
27
+ cpus += 1
28
+ # Create a hash of attributes for each section (i.e. cpu)
29
+ attribs = Hash [ lines . collect { |l | l =~ /^\s *([^:]+):\s +(.*)\s *$/ ; v = $2; [ $1. gsub ( /\s / , '_' ) , v ] } ]
30
+ attribs . each_pair do |attrib , val |
31
+ Facter . add ( "mk_hw_#{ cpu } _#{ attrib } " ) do
32
+ setcode { val }
33
+ end
32
34
end
33
35
end
34
36
end
You can’t perform that action at this time.
0 commit comments