Sha256: 673f77f66239985a2d62cf77a2b149055cb19f466e31ba7c5486852d4772cb54

Contents?: true

Size: 967 Bytes

Versions: 313

Compression:

Stored size: 967 Bytes

Contents

# HP-UX packaging.

require 'puppet/provider/package'

Puppet::Type.type(:package).provide :hpux, :parent => Puppet::Provider::Package do

  desc "HP-UX's packaging system."

  commands :swinstall => "/usr/sbin/swinstall",
    :swlist => "/usr/sbin/swlist",
    :swremove => "/usr/sbin/swremove"

  confine :operatingsystem => "hp-ux"

  defaultfor :operatingsystem => "hp-ux"

  def self.instances
    # TODO:  This is very hard on HP-UX!
    []
  end

  # source and name are required
  def install
    raise ArgumentError, "source must be provided to install HP-UX packages" unless resource[:source]
    args = standard_args + ["-s", resource[:source], resource[:name]]
    swinstall(*args)
  end

  def query
    swlist resource[:name]
    {:ensure => :present}
  rescue
    {:ensure => :absent}
  end

  def uninstall
    args = standard_args + [resource[:name]]
    swremove(*args)
  end

  def standard_args
    ["-x", "mount_all_filesystems=false"]
  end
end

Version data entries

313 entries across 313 versions & 5 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/provider/package/hpux.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/provider/package/hpux.rb
puppet-4.10.12 lib/puppet/provider/package/hpux.rb
puppet-4.10.12-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.12-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.12-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-4.10.11 lib/puppet/provider/package/hpux.rb
puppet-4.10.11-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.11-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.11-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-4.10.10 lib/puppet/provider/package/hpux.rb
puppet-4.10.10-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.10-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.10-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/provider/package/hpux.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/provider/package/hpux.rb
puppet-4.10.9 lib/puppet/provider/package/hpux.rb
puppet-4.10.9-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.9-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-4.10.9-universal-darwin lib/puppet/provider/package/hpux.rb