lib/puppet/provider/service/runit.rb in puppet-3.3.2 vs lib/puppet/provider/service/runit.rb in puppet-3.4.0.rc1

- old
+ new

@@ -40,11 +40,11 @@ # this is necessary to autodetect a valid resource # default path, since there is no standard for such directory. def defpath(dummy_argument=:work_arround_for_ruby_GC_bug) unless @defpath ["/etc/sv", "/var/lib/service"].each do |path| - if FileTest.exist?(path) + if Puppet::FileSystem::File.exist?(path) @defpath = path break end end raise "Could not find the daemon directory (tested [/etc/sv,/var/lib/service])" unless @defpath @@ -55,11 +55,11 @@ # find the service dir on this node def servicedir unless @servicedir ["/service", "/etc/service","/var/service"].each do |path| - if FileTest.exist?(path) + if Puppet::FileSystem::File.exist?(path) @servicedir = path break end end raise "Could not find service directory" unless @servicedir @@ -103,9 +103,9 @@ # doesn't restart our service behind our back # note that runit doesn't need to perform a stop # before a disable def disable # unlink the daemon symlink to disable it - File.unlink(self.service) if FileTest.symlink?(self.service) + Puppet::FileSystem::File.unlink(self.service) if Puppet::FileSystem::File.new(self.service).symlink? end end