File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
hanlon_microkernel/facter Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,19 @@ def def_to_hash(definition, delimiter=':')
115
115
begin
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
- Facter . add ( "mk_hw_fw_#{ fact } " ) do
119
- setcode { memory [ 'firmware' ] [ fact ] }
118
+ if memory [ 'firmware' ] . has_key? fact
119
+ Facter . add ( "mk_hw_fw_#{ fact } " ) do
120
+ setcode { memory [ 'firmware' ] [ fact ] }
121
+ end
120
122
end
121
123
end
122
124
123
125
# Create the facts for the memory info
124
126
%w{ description physical_id slot size } . each do |fact |
125
- Facter . add ( "mk_hw_mem_#{ fact } " ) do
126
- setcode { memory [ 'memory' ] [ fact ] }
127
+ if memory [ 'memory' ] . has_key? fact
128
+ Facter . add ( "mk_hw_mem_#{ fact } " ) do
129
+ setcode { memory [ 'memory' ] [ fact ] }
130
+ end
127
131
end
128
132
end
129
133
You can’t perform that action at this time.
0 commit comments