Issue #21290 has been updated by Tom Seeley.

apologies for the formatting, I had no idea the hash (pound) sign was going to 
be interpreted as a heading.  Also the output from the "strings" command is 
multi-line on my mac (FWIW).

----------------------------------------
Bug #21290: util/virtual.rb reads "/sys/firmware/dmi/entries/1-0/raw" as text
https://projects.puppetlabs.com/issues/21290#change-93078

* Author: Tom Seeley
* Status: Unreviewed
* 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:

# 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^@^@

the net result being is_virtual throws an error:

# facter is_virtual
Could not retrieve virtual: invalid byte sequence in US-ASCII
false

Suggest someone implements the ruby equivalent of "strings" on that sysfs 
value, ie:

# strings  "/sys/firmware/dmi/entries/1-0/raw"
Apple Inc.
Macmini5,3
C000000000Y7
System SKU#
Macmini

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.


Reply via email to