Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lib/facter/resolvers/uname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ def uname_system_call(fact_name)
def build_fact_list(output)
uname_results = output.split("\n")

@fact_list[:machine] = uname_results[0].strip
@fact_list[:nodename] = uname_results[1].strip
@fact_list[:processor] = uname_results[2].strip
@fact_list[:kernelrelease] = uname_results[3].strip
@fact_list[:kernelname] = uname_results[4].strip
@fact_list[:kernelversion] = uname_results[5].strip
if !uname_results.empty?
@fact_list[:machine],
@fact_list[:nodename],
@fact_list[:processor],
@fact_list[:kernelrelease],
@fact_list[:kernelname],
@fact_list[:kernelversion] = uname_results.map(&:strip)
else
log.warn('Request to uname returned no output. Uname related facts are not populated.')
end
end
end
end
Expand Down