aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/puppet-finger
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-29 23:03:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-29 23:03:15 -0300
commit5c03d5b670778cc7c731262c43725df8c94f10da (patch)
tree943a71a1860101a80522c495437008cbe69901d0 /share/hydractl/puppet-finger
parentb05644dd87d04b57fae880b7dbb0a200e52ec850 (diff)
downloadhydra-5c03d5b670778cc7c731262c43725df8c94f10da.tar.gz
hydra-5c03d5b670778cc7c731262c43725df8c94f10da.tar.bz2
Misc fixes at puppet-finger
Diffstat (limited to 'share/hydractl/puppet-finger')
-rwxr-xr-xshare/hydractl/puppet-finger12
1 files changed, 7 insertions, 5 deletions
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"