Skip to content

Commit 537c8a8

Browse files
author
Gerard Hickey
committed
Fixed facts derrived from data structures that are reaped
1 parent b125c38 commit 537c8a8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

hanlon_microkernel/facter/hnl_mk_bus.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
# report out the core values
3434
%w{description product vendor version serial physical_id}.each do |fact|
3535
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 }
3839
end
3940
end
4041
end

hanlon_microkernel/facter/hnl_mk_mem.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,19 @@ def def_to_hash(definition, delimiter=':')
116116
# Create the facts for the firmware info
117117
%w{description vendor physical_id version date size capabilities capacity}.each do |fact|
118118
if memory['firmware'].has_key? fact
119+
val = memory['firmware'][fact]
119120
Facter.add("mk_hw_fw_#{fact}") do
120-
setcode { memory['firmware'][fact] }
121+
setcode { val }
121122
end
122123
end
123124
end
124125

125126
# Create the facts for the memory info
126127
%w{description physical_id slot size }.each do |fact|
127128
if memory['memory'].has_key? fact
129+
val = memory['memory'][fact]
128130
Facter.add("mk_hw_mem_#{fact}") do
129-
setcode { memory['memory'][fact] }
131+
setcode { val }
130132
end
131133
end
132134
end

0 commit comments

Comments
 (0)