fix update_known_hosts to create proper initial temp file
authorJameson Rollins <jrollins@finestructure.net>
Tue, 19 Oct 2010 03:32:21 +0000 (23:32 -0400)
committerJameson Rollins <jrollins@finestructure.net>
Tue, 19 Oct 2010 03:32:21 +0000 (23:32 -0400)
src/share/m/update_known_hosts

index a0311186cca972f74d70753332003568447285c3..737666de2d5201c651c878f40f7449636444f570 100644 (file)
@@ -44,6 +44,8 @@ update_known_hosts() {
 
     trap "lock remove $KNOWN_HOSTS; rm -f $tmpFile" EXIT
 
+    cat "$KNOWN_HOSTS" >"$tmpFile"
+
     for host ; do
        FILE_TYPE='known_hosts' process_keys_for_file "$tmpFile" "ssh://${host}"