From 5c03d5b670778cc7c731262c43725df8c94f10da Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 29 Sep 2011 23:03:15 -0300 Subject: Misc fixes at puppet-finger --- share/hydractl/puppet-finger | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'share') diff --git a/share/hydractl/puppet-finger b/share/hydractl/puppet-finger index 5016554..010cca1 100755 --- a/share/hydractl/puppet-finger +++ b/share/hydractl/puppet-finger @@ -24,15 +24,17 @@ function puppet_openssl { # openssl x509 -text -noout -fingerprint -in /var/lib/puppetmaster/ssl/ca/signed/fqdn.pem # openssl x509 -text -noout -fingerprint -in /var/lib/puppetmaster/ssl/certs/ca.pem # -if [ -d "/var/lib/puppetmaster/ssl/" ]; then - if [ -d "/var/lib/puppetmaster/ssl/ca/signed/" ]; then - for file in `ls /var/lib/puppetmaster/ssl/ca/signed/*pem`; do +if [ -d "/var/lib/puppetmaster/ssl" ]; then + if [ -d "/var/lib/puppetmaster/ssl/ca/signed" ]; then + for file in `ls /var/lib/puppetmaster/ssl/ca/signed`; do fp="`puppet_openssl $file`" echo "`basename $file .pem`: $fp" done fi - echo "ca: `puppet_openssl /var/lib/puppetmaster/ssl/certs/ca.pem`" + if [ -f "/var/lib/puppetmaster/ssl/certs/ca.pem" ]; then + echo "ca: `puppet_openssl /var/lib/puppetmaster/ssl/certs/ca.pem`" + fi fi # Node: @@ -40,7 +42,7 @@ fi # openssl x509 -text -noout -fingerprint -in /var/lib/puppet/ssl/certs/fqdn.pem # openssl x509 -text -noout -fingerprint -in /var/lib/puppet/ssl/certs/ca.pem # -if [ -d "/var/lib/puppet/ssl/" ]; then +if [ -d "/var/lib/puppet/ssl" ]; then fqdn="`facter fqdn`" fp="`puppet_openssl /var/lib/puppet/ssl/certs/$fqdn.pem`" echo "$fqdn: $fp" -- cgit v1.2.3