Add log output for keyserver checking.
[monkeysphere.git] / src / monkeysphere-ssh-proxycommand
index ec162ab8c62985d92bf82eb0e8a0eccb120abc6b..3887e4897d10eca20c7234761ae3e1451238c68c 100755 (executable)
@@ -40,11 +40,12 @@ fi
 # check for the host key in the known_hosts file
 hostKey=$(ssh-keygen -F "$HOST")
 
-# if the host key is not found in the known_hosts file,
-# check the keyserver
-if [ -z "$hostKey" ] ; then
-    CHECK_KEYSERVER="true"
+# if the host key is found in the known_hosts file,
+# don't check the keyserver
+if [ "$hostKey" ] ; then
+    CHECK_KEYSERVER="false"
 fi
+export CHECK_KEYSERVER
 
 # update the known_hosts file for the host
 monkeysphere update-known-hosts "$HOST"