]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mksshfp
Suppress some warnings from sshfp
[dns.git] / bin / mksshfp
index 3c1cd1dd49c4e327f8dd81d7629696b5ca63e148..ef8dda051137d24f081c0ad3fdf7f1fe7c1542ad 100755 (executable)
@@ -4,7 +4,7 @@ my %hosts;
 
 if (-f "/etc/ssh/ssh_known_hosts")
 {
-    open(SSHFP, "-|","sshfp", "-k", "/etc/ssh/ssh_known_hosts") || die $!;
+    open(SSHFP, "-|","sshfp -k /etc/ssh/ssh_known_hosts 2>&1") || die $!;
 
     while (my $line = <SSHFP>)
     {
@@ -45,7 +45,7 @@ if (-f "/etc/ssh/ssh_known_hosts")
                 }
             }
         }
-        else
+        elsif ($line !~ /^WARNING: Assuming /)
         {
             warn $line;
         }