Permalink
Browse files

Make sure we use the root Puppet class to avoid bad naming issues

  • Loading branch information...
1 parent 0c05ee1 commit 78bf7acbc498ad664619f06a74cbd0445e392423 @ripienaar ripienaar committed Sep 16, 2010
Showing with 8 additions and 8 deletions.
  1. +4 −4 agent/package/puppet-package.rb
  2. +4 −4 agent/service/puppet-service.rb
@@ -34,11 +34,11 @@ def do_pkg_action(package, action)
begin
require 'puppet'
- if Puppet.version =~ /0.24/
- Puppet::Type.type(:package).clear
- pkg = Puppet::Type.type(:package).create(:name => package).provider
+ if ::Puppet.version =~ /0.24/
+ ::Puppet::Type.type(:package).clear
+ pkg = ::Puppet::Type.type(:package).create(:name => package).provider
else
- pkg = Puppet::Type.type(:package).new(:name => package).provider
+ pkg = ::Puppet::Type.type(:package).new(:name => package).provider
end
reply[:output] = ""
@@ -41,11 +41,11 @@ def get_puppet(service)
require 'puppet'
- if Puppet.version =~ /0.24/
- Puppet::Type.type(:service).clear
- svc = Puppet::Type.type(:service).create(:name => service, :hasstatus => hasstatus, :hasrestart => hasrestart).provider
+ if ::Puppet.version =~ /0.24/
+ ::Puppet::Type.type(:service).clear
+ svc = ::Puppet::Type.type(:service).create(:name => service, :hasstatus => hasstatus, :hasrestart => hasrestart).provider
else
- svc = Puppet::Type.type(:service).new(:name => service, :hasstatus => hasstatus, :hasrestart => hasrestart).provider
+ svc = ::Puppet::Type.type(:service).new(:name => service, :hasstatus => hasstatus, :hasrestart => hasrestart).provider
end
svc

0 comments on commit 78bf7ac

Please sign in to comment.