-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FACT-2218) virtual fact for OSX #1945
Conversation
…mation from system profile records.
…le resolver. Update namespace for System profile resolver.
CLA signed by all contributors. |
|
||
def check_parallels | ||
subsystem_vendor_id = Facter::Resolvers::Macosx::SystemProfiler.resolve(:subsystem_vendor_id) | ||
return 'parallels' if subsystem_vendor_id&.start_with?('0x1ab8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 0x1ab8 constant? Won't it change on other versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a constant used since Facter 2.x
Line 59 in f81a706
result = "parallels" if output["spethernet_subsystem-vendor-id"] =~ /0x1ab8/ |
It is the same for Facter 3.x
if (line == "Subsystem Vendor ID: 0x1ab8") { |
Added
virtual
fact. Refactoredsystem_profiler
resolver so it only reads partial data.