MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.217.207.112
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/ruby/vendor_ruby/puppet/provider/package/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/ruby/vendor_ruby/puppet/provider/package/hpux.rb
# 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

MMCT - 2023