mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
hardcode "Apple Inc." vendor if on OSX
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
This commit is contained in:
parent
64777457c9
commit
2700018c58
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ module Inspec::Resources
|
|||
# returns the Manufacturer of the local system
|
||||
def manufacturer
|
||||
os = inspec.os
|
||||
if os.linux? || os.darwin?
|
||||
if os.darwin?
|
||||
'Apple Inc.'
|
||||
elsif os.linux?
|
||||
inspec.command("dmidecode | grep 'Vendor :'").split(": ").last.chomp
|
||||
elsif os.windows?
|
||||
inspec.powershell("Get-CimInstance -ClassName Win32_ComputerSystem | Select Manufacturer -ExpandProperty Manufacturer").stdout.chomp
|
||||
|
|
Loading…
Add table
Reference in a new issue