diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-08-29 22:53:17 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-08-29 22:53:17 +0000 |
commit | f65563d3d6eddeeac5f1b14e7b2635776be802a7 (patch) | |
tree | d893aa719fa360d10871bd40fab35540f1234f50 /bin/puppetmasterd | |
parent | 062906591bc21d761ed00d33f9fa95c425b16ccd (diff) | |
download | puppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.tar.gz puppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.tar.xz puppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.zip |
changing default hostname to "puppet", and adding --parseonly option along with a test case for it
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@606 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin/puppetmasterd')
-rwxr-xr-x | bin/puppetmasterd | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/puppetmasterd b/bin/puppetmasterd index 1e9735ff5..c36a62566 100755 --- a/bin/puppetmasterd +++ b/bin/puppetmasterd @@ -10,7 +10,7 @@ # puppetmasterd [-h|--help] [-d|--debug] [-v|--verbose] [-V|--version] # [-l|--logdest <syslog|console|<file>>] [--httplog <file>] # [-m|--manifest <site manifest>] [--noca] [-p|--port <port>] -# [-s|--ssldir <cert directory>] +# [--parseonly] [-s|--ssldir <cert directory>] # # = Description # @@ -47,6 +47,9 @@ # noca:: # Do not function as a certificate authority. # +# parseonly:: +# Just parse the central manifest to verify it is syntactically correct. +# # port:: # The port on which to listen. Defaults to 8139. # @@ -85,6 +88,7 @@ result = GetoptLong.new( [ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ], [ "--manifest", "-m", GetoptLong::REQUIRED_ARGUMENT ], [ "--noca", GetoptLong::NO_ARGUMENT ], + [ "--parseonly", GetoptLong::NO_ARGUMENT ], [ "--port", "-p", GetoptLong::REQUIRED_ARGUMENT ], [ "--ssldir", "-s", GetoptLong::REQUIRED_ARGUMENT ], [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ], @@ -105,6 +109,8 @@ ca = {} fs = {} args = {} +parseonly = false + begin result.each { |opt,arg| case opt @@ -132,6 +138,8 @@ begin master[:File] = arg when "--noca" haveca = false + when "--parseonly" + parseonly = true when "--port" args[:Port] = arg when "--ssldir" @@ -207,6 +215,11 @@ rescue => detail exit(1) end +if parseonly + # we would have already exited if the file weren't syntactically correct + exit(0) +end + if bg server.daemonize end |