Issue #21290 has been updated by Josh Cooper. Description updated Status changed from Unreviewed to Accepted
---------------------------------------- Bug #21290: util/virtual.rb reads "/sys/firmware/dmi/entries/1-0/raw" as text https://projects.puppetlabs.com/issues/21290#change-93641 * Author: Tom Seeley * Status: Accepted * Priority: Normal * Assignee: * Category: * Target version: * Keywords: * Branch: * Affected Facter version: 1.7.1 ---------------------------------------- but it isn't, or at least isn't always. On a Mac mini you get this: <pre> # cat -v "/sys/firmware/dmi/entries/1-0/raw" ^A^[/^@^A^Y^C^FB^[m^BW,M-bZM-!tM-^VM-^K6M-!$M-^H^F^E^FApple Inc.^@Macmini5,3^@1.0^@C000000000Y7^@System SKU#^@Macmini^@^@ </pre> the net result being is_virtual throws an error: <pre> # facter is_virtual Could not retrieve virtual: invalid byte sequence in US-ASCII false </pre> Suggest someone implements the ruby equivalent of "strings" on that sysfs value, ie: <pre> # strings "/sys/firmware/dmi/entries/1-0/raw" Apple Inc. Macmini5,3 C000000000Y7 System SKU# Macmini </pre> My Ruby skills aren't up to the job as yet. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
