diff options
-rw-r--r-- | lib/puppet.rb | 2 | ||||
-rw-r--r-- | lib/puppet/network/server/servlet.rb | 4 | ||||
-rw-r--r-- | lib/puppet/sslcertificates/ca.rb | 2 | ||||
-rw-r--r-- | lib/puppet/util/config.rb | 4 | ||||
-rw-r--r-- | lib/puppet/util/log.rb | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb index d6d9840bb..1b7f97b74 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -38,7 +38,7 @@ module Puppet end - def self.name + def Puppet.execname unless defined? @name @name = $0.gsub(/.+#{File::SEPARATOR}/,'').sub(/\.rb$/, '') end diff --git a/lib/puppet/network/server/servlet.rb b/lib/puppet/network/server/servlet.rb index 0a7253eff..325956d8c 100644 --- a/lib/puppet/network/server/servlet.rb +++ b/lib/puppet/network/server/servlet.rb @@ -59,13 +59,13 @@ class Puppet::Network::Server # This means we can't actually test this method at this point. # The next release of Puppet will almost definitely require # this file to exist or will default to denying all access. - if Puppet.name == "puppetmasterd" or defined? Test::Unit::TestCase + if Puppet.execname == "puppetmasterd" or defined? Test::Unit::TestCase Puppet.debug "Allowing %s(%s) trusted access to %s" % [client, ip, method] return true else Puppet.debug "Denying %s(%s) trusted access to %s on %s" % - [client, ip, method, Puppet.name] + [client, ip, method, Puppet.execname] return false end end diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb index 0d5678b7a..ea3822015 100644 --- a/lib/puppet/sslcertificates/ca.rb +++ b/lib/puppet/sslcertificates/ca.rb @@ -97,7 +97,7 @@ class Puppet::SSLCertificates::CA if FileTest.exists?(file) begin - if Puppet.name == "puppetca" + if Puppet.execname == "puppetca" puts "Removing %s" % file else Puppet.info "Removing %s" % file diff --git a/lib/puppet/util/config.rb b/lib/puppet/util/config.rb index b94b84051..117f87f92 100644 --- a/lib/puppet/util/config.rb +++ b/lib/puppet/util/config.rb @@ -301,7 +301,7 @@ class Puppet::Util::Config # the group can be set in the config file. The problem # is that we're using the word 'group' twice, which is # confusing. - if var == :group and section == Puppet.name and @config.include?(:group) + if var == :group and section == Puppet.execname and @config.include?(:group) @config[:group].value = value end next @@ -519,7 +519,7 @@ class Puppet::Util::Config # Convert our list of objects into a configuration file. def to_config - str = %{The configuration file for #{Puppet.name}. Note that this file + str = %{The configuration file for #{Puppet.execname}. Note that this file is likely to have unused configuration parameters in it; any parameter that's valid anywhere in Puppet can be in any config file, even if it's not used. diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb index 5ee60b959..38f9d8de1 100644 --- a/lib/puppet/util/log.rb +++ b/lib/puppet/util/log.rb @@ -167,7 +167,7 @@ class Puppet::Util::Log if Syslog.opened? Syslog.close end - name = Puppet.name + name = Puppet.execname name = "puppet-#{name}" unless name =~ /puppet/ options = Syslog::LOG_PID | Syslog::LOG_NDELAY |