All of the settings were there, we just weren't doing anything
about them.

Signed-off-by: Luke Kanies <[email protected]>
---
 lib/puppet/application/puppetd.rb |    2 +-
 spec/unit/application/puppetd.rb  |    9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/application/puppetd.rb 
b/lib/puppet/application/puppetd.rb
index 7a92db1..1f97043 100644
--- a/lib/puppet/application/puppetd.rb
+++ b/lib/puppet/application/puppetd.rb
@@ -229,7 +229,7 @@ Puppet::Application.new(:puppetd) do
 
         enable_disable_client(@agent) if options[:enable] or options[:disable]
 
-        @daemon.agent = agent
+        @daemon.agent = agent if options[:client]
 
         # It'd be nice to daemonize later, but we have to daemonize before the
         # waitforcert happens.
diff --git a/spec/unit/application/puppetd.rb b/spec/unit/application/puppetd.rb
index dcd8618..08f2a07 100755
--- a/spec/unit/application/puppetd.rb
+++ b/spec/unit/application/puppetd.rb
@@ -327,11 +327,18 @@ describe "puppetd" do
             end
         end
 
-        it "should inform the daemon about our agent" do
+        it "should inform the daemon about our agent if :client is set to 
'true'" do
+            @puppetd.options.expects(:[]).with(:client).returns true
             @daemon.expects(:agent=).with(@agent)
             @puppetd.run_setup
         end
 
+        it "should not inform the daemon about our agent if :client is set to 
'false'" do
+            @puppetd.options[:client] = false
+            @daemon.expects(:agent=).never
+            @puppetd.run_setup
+        end
+
         it "should daemonize if needed" do
             Puppet.stubs(:[]).with(:daemonize).returns(true)
 
-- 
1.6.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to