Skip to content

Commit 19515a0

Browse files
committed
Switch to using Linux run mode on Linux
1 parent 010c0f4 commit 19515a0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/puppet/util/platform.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ def solaris?
2121
end
2222
module_function :solaris?
2323

24+
def linux?
25+
RUBY_PLATFORM.include?('linux')
26+
end
27+
module_function :linux?
28+
2429
def default_paths
2530
return [] if windows?
2631

lib/puppet/util/run_mode.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def self.[](name)
1515
@run_modes ||= {}
1616
if Puppet::Util::Platform.windows?
1717
@run_modes[name] ||= WindowsRunMode.new(name)
18+
elsif Puppet::Util::Platform.linux?
19+
@run_modes[name] ||= LinuxRunMode.new(name)
1820
else
1921
@run_modes[name] ||= UnixRunMode.new(name)
2022
end

0 commit comments

Comments
 (0)