Sha256: 51cecbc2637556c61eec1a2e2bbf367319bc7eb1b45b7789fc15473febaf4876

Contents?: true

Size: 988 Bytes

Versions: 120

Compression:

Stored size: 988 Bytes

Contents

# HP-UX packaging.

require_relative '../../../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

120 entries across 120 versions & 1 rubygems

Version Path
puppet-7.20.0 lib/puppet/provider/package/hpux.rb
puppet-7.20.0-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.20.0-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.20.0-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-7.19.0 lib/puppet/provider/package/hpux.rb
puppet-7.19.0-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.19.0-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.19.0-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-7.18.0 lib/puppet/provider/package/hpux.rb
puppet-7.18.0-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.18.0-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.18.0-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-7.17.0 lib/puppet/provider/package/hpux.rb
puppet-7.17.0-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.17.0-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.17.0-universal-darwin lib/puppet/provider/package/hpux.rb
puppet-7.16.0 lib/puppet/provider/package/hpux.rb
puppet-7.16.0-x86-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.16.0-x64-mingw32 lib/puppet/provider/package/hpux.rb
puppet-7.16.0-universal-darwin lib/puppet/provider/package/hpux.rb