diff options
| author | Luke Kanies <luke@madstop.com> | 2007-11-27 21:20:26 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-11-27 21:20:26 -0600 |
| commit | 1b2142b7dd9ef7bea2c4591e512feef230ecc072 (patch) | |
| tree | a12c7904154c8dc129df9a24d04e059407e03f68 /bin/puppetca | |
| parent | c7cd7ecc3b35351de615e369d7d1b91651427bf2 (diff) | |
| download | puppet-1b2142b7dd9ef7bea2c4591e512feef230ecc072.tar.gz puppet-1b2142b7dd9ef7bea2c4591e512feef230ecc072.tar.xz puppet-1b2142b7dd9ef7bea2c4591e512feef230ecc072.zip | |
Applying patches from #823 by wyvern
Diffstat (limited to 'bin/puppetca')
| -rwxr-xr-x | bin/puppetca | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/puppetca b/bin/puppetca index ce78118bc..42bb245a9 100755 --- a/bin/puppetca +++ b/bin/puppetca @@ -32,7 +32,8 @@ # '--genconfig'. # # all:: -# Operate on all outstanding requests. Only makes sense with '--sign'. +# Operate on all outstanding requests. Only makes sense with '--sign', +# or '--list'. # # clean:: # Remove all files related to a host from puppetca's storage. This is @@ -51,7 +52,8 @@ # Print this help message # # list:: -# List outstanding certificate requests. +# List outstanding certificate requests. If '--all' is specified, +# signed certificates are also listed, prefixed by '+'. # # revoke:: # Revoke the certificate of a client. The certificate can be specified @@ -172,7 +174,7 @@ unless mode exit(12) end -if [:generate, :clean, :revoke].include?(mode) +if [:generate, :clean, :revoke, :list].include?(mode) hosts = ARGV.collect { |h| h.downcase } else waiting = ca.list @@ -189,7 +191,13 @@ end case mode when :list - puts waiting.join("\n") + waiting = ca.list + if waiting.length > 0 + puts waiting.join("\n") + end + if all + puts ca.list_signed.collect { |cert | cert.sub(/^/,"+ ") }.join("\n") + end when :clean if hosts.empty? $stderr.puts "You must specify one or more hosts to clean" |
