File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
hanlon_microkernel/facter Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 33
33
# report out the core values
34
34
%w{ description product vendor version serial physical_id } . each do |fact |
35
35
if results [ 'core' ] . has_key? fact
36
- Facter . add ( "mk_hw_bus_#{ fact } " ) do
37
- setcode { results [ 'core' ] [ fact ] }
36
+ val = results [ 'core' ] [ fact ]
37
+ Facter . add ( "mk_hw_bus_core_#{ fact } " ) do
38
+ setcode { val }
38
39
end
39
40
end
40
41
end
Original file line number Diff line number Diff line change @@ -116,17 +116,19 @@ def def_to_hash(definition, delimiter=':')
116
116
# Create the facts for the firmware info
117
117
%w{ description vendor physical_id version date size capabilities capacity } . each do |fact |
118
118
if memory [ 'firmware' ] . has_key? fact
119
+ val = memory [ 'firmware' ] [ fact ]
119
120
Facter . add ( "mk_hw_fw_#{ fact } " ) do
120
- setcode { memory [ 'firmware' ] [ fact ] }
121
+ setcode { val }
121
122
end
122
123
end
123
124
end
124
125
125
126
# Create the facts for the memory info
126
127
%w{ description physical_id slot size } . each do |fact |
127
128
if memory [ 'memory' ] . has_key? fact
129
+ val = memory [ 'memory' ] [ fact ]
128
130
Facter . add ( "mk_hw_mem_#{ fact } " ) do
129
- setcode { memory [ 'memory' ] [ fact ] }
131
+ setcode { val }
130
132
end
131
133
end
132
134
end
You can’t perform that action at this time.
0 commit comments