403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.145.37.126
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet//confine.rb
# The class that handles testing whether our providers
# actually work or not.
require_relative '../puppet/util'

class Puppet::Confine
  include Puppet::Util

  @tests = {}

  class << self
    attr_accessor :name
  end

  def self.inherited(klass)
    name = klass.to_s.split("::").pop.downcase.to_sym
    raise "Test #{name} is already defined" if @tests.include?(name)

    klass.name = name

    @tests[name] = klass
  end

  def self.test(name)
    unless @tests.include?(name)
      begin
        require "puppet/confine/#{name}"
      rescue LoadError => detail
        unless detail.to_s =~ /No such file|cannot load such file/i
          Puppet.warning("Could not load confine test '#{name}': #{detail}")
        end
        # Could not find file
        if !Puppet[:always_retry_plugins]
          @tests[name] = nil
        end
      end
    end
    @tests[name]
  end

  attr_reader :values

  # Mark that this confine is used for testing binary existence.
  attr_accessor :for_binary
  def for_binary?
    for_binary
  end

  # Used for logging.
  attr_accessor :label

  def initialize(values)
    values = [values] unless values.is_a?(Array)
    @values = values
  end

  # Provide a hook for the message when there's a failure.
  def message(value)
    ""
  end

  # Collect the results of all of them.
  def result
    values.collect { |value| pass?(value) }
  end

  # Test whether our confine matches.
  def valid?
    values.each do |value|
      unless pass?(value)
        Puppet.debug { label + ": " + message(value) }
        return false
      end
    end

    return true
  ensure
    reset
  end

  # Provide a hook for subclasses.
  def reset
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit