Issue #21290 has been updated by Josh Cooper. Status changed from Accepted to Duplicate
This is a duplicate of #20915, to be released in 1.7.2 With respect to [comment 2](https://projects.puppetlabs.com/issues/21290#note-2), commit [a164fe3f2](https://github.com/puppetlabs/facter/commit/a164fe3f2679f1e63a9f4ede9b3a10d109ca4d67) changed the code from `File.read` to `FileRead.read_binary`, but the semantics are the same -- an exception is raised the same as it was before. And since the `read_sysfs_dmi_entries` method is called within a `setcode` block the exception is caught and logged. ---------------------------------------- Bug #21290: util/virtual.rb reads "/sys/firmware/dmi/entries/1-0/raw" as text https://projects.puppetlabs.com/issues/21290#change-93643 * Author: Tom Seeley * Status: Duplicate * 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.
