Skip to content

Commit 38e0a6e

Browse files
authored
Merge pull request #98 from alavaliant/fallback_to_uname_machine_for_uutils_coreutils
Fallback to using uname machine for hosts using uutils/coreutils
2 parents 98a7dec + 27500fd commit 38e0a6e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/facter/resolvers/uname.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def build_fact_list(output)
3535
@fact_list[:kernelrelease],
3636
@fact_list[:kernelname],
3737
@fact_list[:kernelversion] = uname_results.map(&:strip)
38+
# uutils/coreutils uname does not implement -p and returns "unknown".
39+
# Fall back to -m (machine), which is the procedure suggested by the
40+
# uutils/coreutils developers.
41+
@fact_list[:processor] = @fact_list[:machine] if @fact_list[:processor] == 'unknown'
3842
else
3943
log.warn('Request to uname returned no output. Uname related facts are not populated.')
4044
end

0 commit comments

Comments
 (0)