The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14541

Facter Util Manufacturer detect dmidecode

Added by Nan Liu almost 2 years ago. Updated almost 2 years ago.

Status:AcceptedStart date:05/16/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Keywords: Affected Facter version:
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the FACT project on JIRA using the button below:


Description

We should use facter.util.resolution instead of FileTest.exists? with hard coded filepath in util/manufacturer.rb:

when 'Linux', 'GNU/kFreeBSD'
  return nil unless FileTest.exists?("/usr/sbin/dmidecode")
when 'FreeBSD'
  return nil unless FileTest.exists?("/usr/local/sbin/dmidecode")
when 'NetBSD'
  return nil unless FileTest.exists?("/usr/pkg/sbin/dmidecode")

History

#1 Updated by Krzysztof Wilczynski almost 2 years ago

Hi,

This might be another use-case which will justify addition of “which”-alike concept to Facter, as per what was mentioned in #13396, instead of just having File#exists? there.

KW

#2 Updated by Anonymous almost 2 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Anonymous

Also available in: Atom PDF