config_display_ssh_fingerprints: adjust check for present host keys
authorMichael Prokop <mika@grml.org>
Tue, 2 Oct 2012 07:43:45 +0000 (09:43 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 2 Oct 2012 07:43:47 +0000 (09:43 +0200)
find doesn't return an error if there are no matches.

autoconfig.functions

index 19e7459..2736153 100755 (executable)
@@ -1126,7 +1126,7 @@ fi
 
 # {{{ display hostkeys of SSH server
 config_display_ssh_fingerprints() {
 
 # {{{ display hostkeys of SSH server
 config_display_ssh_fingerprints() {
-  if ! find /etc/ssh/ -name ssh_host_\*_key >/dev/null 2>&1 ; then
+  if ! ls /etc/ssh/ssh_host_\*_key >/dev/null 2>&1 ; then
     return 0 # no SSH host keys present
   fi
 
     return 0 # no SSH host keys present
   fi