diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-01-23 22:38:39 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-01-23 22:38:39 +0000 |
| commit | 18e8e74a2e3b4c5d092fc0aae38bbc5455d4db48 (patch) | |
| tree | a655a05e449fb0f3218d87555b33c7fb57968fdc /bin/puppetd | |
| parent | 258114d48b4853cbaa79b53776d5279f727451ab (diff) | |
| download | puppet-18e8e74a2e3b4c5d092fc0aae38bbc5455d4db48.tar.gz puppet-18e8e74a2e3b4c5d092fc0aae38bbc5455d4db48.tar.xz puppet-18e8e74a2e3b4c5d092fc0aae38bbc5455d4db48.zip | |
Committing most of the scheduling stuff. There is still a bit of work to do in terms of how puppetd interacts with scheduling, but the bulk of the work is done.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@847 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin/puppetd')
| -rwxr-xr-x | bin/puppetd | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/puppetd b/bin/puppetd index 9ba6f89f1..6d2b804b0 100755 --- a/bin/puppetd +++ b/bin/puppetd @@ -11,7 +11,7 @@ # puppetd [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] # [--ssldir <cert directory>] [-l|--logdest <syslog|<file>|console>] # [--fqdn <host name>] [-p|--port <port>] [-o|--onetime] -# [-s|--server <server>] +# [-s|--server <server>] [-i|--ignoreschedules] # [-w|--waitforcert <seconds>] [-c|--confdir <configuration directory>] # [--vardir <var directory>] [--centrallogging] # @@ -58,7 +58,15 @@ # The port to which to connect on the remote server. Currently defaults to 8139. # # onetime:: -# Run the configuration once, rather than as a long-running daemon. +# Run the configuration once, rather than as a long-running daemon. This is +# useful for interactively running puppetd. +# +# schedule:: +# What schedule Puppet itself should run on. This dictates how often the +# entire configuration is retrieved and run. The default is named 'puppet', +# and runs every half hour or so. The schedules themselves are defined in the +# configuration, which means that on startup puppetd will always retrieve +# the configuration and then check to see if it's scheduled to run. # # server:: # The remote server from whom to receive the local configuration. Currently @@ -117,6 +125,7 @@ result = GetoptLong.new( [ "--noop", "-n", GetoptLong::NO_ARGUMENT ], [ "--onetime", "-o", GetoptLong::NO_ARGUMENT ], [ "--port", "-p", GetoptLong::REQUIRED_ARGUMENT ], + [ "--schedule", "-S", GetoptLong::REQUIRED_ARGUMENT ], [ "--server", "-s", GetoptLong::REQUIRED_ARGUMENT ], [ "--ssldir", GetoptLong::REQUIRED_ARGUMENT ], [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ], @@ -134,6 +143,7 @@ waitforcert = false onetime = false centrallogs = false + begin result.each { |opt,arg| case opt @@ -159,6 +169,10 @@ begin Puppet[:logdest] = :console when "--noop" Puppet[:noop] = true + when "--schedule" + # This is late-binding -- it'll only look up the schedule name + # when it needs to run + Puppet[:schedule] = arg when "--ssldir" Puppet[:ssldir] = arg when "--fqdn" |
