[anyterm] fix known_hosts creation

abo abo at fedoraproject.org
Fri Jun 1 22:19:50 UTC 2012


commit 314deb896ab015eaf3d7805356701ba247d1d700
Author: Alexander Boström <abo at root.snowtree.se>
Date:   Sat Jun 2 00:08:33 2012 +0200

    fix known_hosts creation

 anyterm-cmd |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/anyterm-cmd b/anyterm-cmd
index 14c0f20..6d65573 100644
--- a/anyterm-cmd
+++ b/anyterm-cmd
@@ -15,8 +15,10 @@ while : ; do
     # Make sure it does not start with a "-" and only contains valid
     # username characters.
     if [[ "$U" =~ ^[A-Za-z0-9_][A-Za-z0-9_-]*$ ]]; then
-	if [[ ! -e ~/.ssh/known_hosts ]]; then
-	    mkdir -p --mode=700 ~/.ssh
+	cd ~
+
+	if [[ ! -e .ssh/known_hosts ]]; then
+	    mkdir -p --mode=700 .ssh
 	    for k in /etc/ssh/ssh_host_{rsa,dsa}_key.pub; do
 		if [[ -r "$k" ]]; then
 		    echo -n "localhost.localdomain "


More information about the scm-commits mailing list