Class: Inspec::Resources::HpuxPkg
- Inherits:
-
PkgManagement
- Object
- PkgManagement
- Inspec::Resources::HpuxPkg
- Defined in:
- lib/inspec/resources/package.rb
Instance Attribute Summary
Attributes inherited from PkgManagement
Instance Method Summary collapse
Methods inherited from PkgManagement
#initialize, #missing_requirements
Constructor Details
This class inherits a constructor from Inspec::Resources::PkgManagement
Instance Method Details
#info(package_name) ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/inspec/resources/package.rb', line 246 def info(package_name) cmd = inspec.command("swlist -l product | grep #{package_name}") return {} if cmd.exit_status.to_i != 0 pkg = cmd.stdout.strip.split(" ") { name: pkg[0], installed: true, version: pkg[1], type: "pkg", } end |