403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.138.124.135
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/apple.rb
require_relative '../../../puppet/provider/package'

# OS X Packaging sucks.  We can install packages, but that's about it.
Puppet::Type.type(:package).provide :apple, :parent => Puppet::Provider::Package do
  desc "Package management based on OS X's built-in packaging system.  This is
    essentially the simplest and least functional package system in existence --
    it only supports installation; no deletion or upgrades.  The provider will
    automatically add the `.pkg` extension, so leave that off when specifying
    the package name."

  confine :operatingsystem => :darwin
  commands :installer => "/usr/sbin/installer"

  def self.instances
    instance_by_name.collect do |name|
      self.new(
        :name     => name,
        :provider => :apple,
        :ensure   => :installed
      )
    end
  end

  def self.instance_by_name
    Dir.entries("/Library/Receipts").find_all { |f|
      f =~ /\.pkg$/
    }.collect { |f|
      name = f.sub(/\.pkg/, '')
      yield name if block_given?

      name
    }
  end

  def query
    Puppet::FileSystem.exist?("/Library/Receipts/#{@resource[:name]}.pkg") ? {:name => @resource[:name], :ensure => :present} : nil
  end

  def install
    source = @resource[:source]
    unless source
      self.fail _("Mac OS X packages must specify a package source")
    end

    installer "-pkg", source, "-target", "/"
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit