diff options
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/daemon.rb | 7 | ||||
-rw-r--r-- | lib/puppet/networkclient.rb | 4 | ||||
-rw-r--r-- | lib/puppet/server/master.rb | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/lib/puppet/daemon.rb b/lib/puppet/daemon.rb index a8ef0a87a..fcedff3d7 100755 --- a/lib/puppet/daemon.rb +++ b/lib/puppet/daemon.rb @@ -3,7 +3,8 @@ require 'puppet' module Puppet - # A module that handles operations common to all daemons. + # A module that handles operations common to all daemons. This is included + # into the Server and Client base classes. module Daemon def daemonname $0.sub(/.+#{File::SEPARATOR}/,'') @@ -74,6 +75,7 @@ module Puppet return log end + # Read in an existing certificate. def readcert return unless @secureinit # verify we've got all of the certs set up and such @@ -109,6 +111,9 @@ module Puppet return true end + # Request a certificate from the remote system. This does all of the work + # of creating the cert request, contacting the remote system, and + # storing the cert locally. def requestcert retrieved = false # create the directories involved diff --git a/lib/puppet/networkclient.rb b/lib/puppet/networkclient.rb index 31bc9a9dd..fc204ce10 100644 --- a/lib/puppet/networkclient.rb +++ b/lib/puppet/networkclient.rb @@ -134,6 +134,10 @@ module Puppet def local false end + + def local? + false + end end end end diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index 1b9883ead..377b8e9e1 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -145,6 +145,14 @@ class Server return CGI.escape(str) end end + + def local? + if defined? @local and @local + return true + else + return false + end + end end end end |