Module: Puppet::Util::Platform
- Defined in:
- lib/puppet/util/platform.rb
Constant Summary collapse
- FIPS_STATUS_FILE =
"/proc/sys/crypto/fips_enabled".freeze
Class Method Summary collapse
Class Method Details
.default_paths ⇒ Object
17 18 19 20 21 |
# File 'lib/puppet/util/platform.rb', line 17 def default_paths return [] if windows? %w{/usr/sbin /sbin} end |
.fips_enabled? ⇒ Boolean
28 29 30 |
# File 'lib/puppet/util/platform.rb', line 28 def fips_enabled? @fips_enabled end |
.jruby? ⇒ Boolean
33 34 35 |
# File 'lib/puppet/util/platform.rb', line 33 def self.jruby? RUBY_PLATFORM == 'java' end |
.windows? ⇒ Boolean
7 8 9 10 11 12 13 14 |
# File 'lib/puppet/util/platform.rb', line 7 def windows? # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard # library uses that to test what platform it's on. In some places we # would use Puppet.features.microsoft_windows?, but this method can be # used to determine the behavior of the underlying system without # requiring features to be initialized and without side effect. !!File::ALT_SEPARATOR end |