diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-09 22:12:59 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-09 22:12:59 +0000 |
| commit | 5a4f80786d5b2079ce977e9cccd5503e3f8f2580 (patch) | |
| tree | 1b552ef856dae89f2d3af12507c474e188e286b9 | |
| parent | cbb4578f054afcbad5b4d7a49601d2207da18d0b (diff) | |
| download | puppet-5a4f80786d5b2079ce977e9cccd5503e3f8f2580.tar.gz puppet-5a4f80786d5b2079ce977e9cccd5503e3f8f2580.tar.xz puppet-5a4f80786d5b2079ce977e9cccd5503e3f8f2580.zip | |
Fixing #326 -- parseonly now just creates a simple Master without opening a port
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1849 980ebf18-57e1-0310-9a29-db15c13687c0
| -rwxr-xr-x | bin/puppetmasterd | 18 | ||||
| -rw-r--r-- | lib/puppet/parser/grammar.ra | 4 | ||||
| -rw-r--r-- | lib/puppet/parser/parser.rb | 8 |
3 files changed, 19 insertions, 11 deletions
diff --git a/bin/puppetmasterd b/bin/puppetmasterd index ec47075f8..cf3b42cff 100755 --- a/bin/puppetmasterd +++ b/bin/puppetmasterd @@ -227,6 +227,19 @@ if options[:havebucket] handlers[:FileBucket] = bucket end +if Puppet[:parseonly] + begin + Puppet::Server::Master.new(master) + rescue => detail + if Puppet[:trace] + puts detail.backtrace + end + $stderr.puts detail + end + # we would have already exited if the file weren't syntactically correct + exit(0) +end + if File.exists?(Puppet[:fileserverconfig]) fs[:Config] = Puppet[:fileserverconfig] #else @@ -264,11 +277,6 @@ if Process.uid == 0 end end -if Puppet[:parseonly] - # we would have already exited if the file weren't syntactically correct - exit(0) -end - Puppet.newservice(server) Puppet.settraps diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index aea9b404d..5bf96c254 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -570,11 +570,11 @@ arguments: argument } argument: NAME EQUALS rvalue { - Puppet.warning addcontext("Deprecation notice: #{val[0].value} must now include '$' in prototype") + Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0], val[2]] } | NAME { - Puppet.warning addcontext("Deprecation notice: #{val[0].value} must now include '$' in prototype") + Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0]] } | VARIABLE EQUALS rvalue { result = [val[0], val[2]] diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb index c69829718..3af74b1fe 100644 --- a/lib/puppet/parser/parser.rb +++ b/lib/puppet/parser/parser.rb @@ -29,7 +29,7 @@ module Puppet class Parser < Racc::Parser -module_eval <<'..end grammar.ra modeval..id4401d72c60', 'grammar.ra', 628 +module_eval <<'..end grammar.ra modeval..id77a61a6f39', 'grammar.ra', 628 require 'puppet/parser/functions' attr_reader :file, :interp @@ -199,7 +199,7 @@ end # $Id$ -..end grammar.ra modeval..id4401d72c60 +..end grammar.ra modeval..id77a61a6f39 ##### racc 1.4.5 generates ### @@ -1636,7 +1636,7 @@ module_eval <<'.,.,', 'grammar.ra', 570 module_eval <<'.,.,', 'grammar.ra', 575 def _reduce_137( val, _values, result ) - Puppet.warning addcontext("Deprecation notice: #{val[0].value} must now include '$' in prototype") + Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0], val[2]] result end @@ -1644,7 +1644,7 @@ module_eval <<'.,.,', 'grammar.ra', 575 module_eval <<'.,.,', 'grammar.ra', 579 def _reduce_138( val, _values, result ) - Puppet.warning addcontext("Deprecation notice: #{val[0].value} must now include '$' in prototype") + Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0]] result end |
