From: Rob H. <for...@us...> - 2003-04-01 01:21:43
|
Update of /cvsroot/sandweb/sandweb/bin In directory sc8-pr-cvs1:/tmp/cvs-serv11557/bin Modified Files: sandweb-editor sandweb-expect Added Files: sandweb-ssh Log Message: finally! conquered SSH host key checking and Expect. We need a wrapper around SSH for SandWeb to use, so we can pass the "-o StrictHostKeyChecking no" option ( works in both OpenSSH and SSH.com versions ). This eliminates the timeouts and complexity in sandweb-expect. --- NEW FILE --- #!/bin/sh # # This is a wrapper script around SSH, so we can pass # arguments to it safely. # # Copyright 2003 Rob Helmer <ro...@ro...> # Made for the SandWeb project - http://sandweb.sf.net # NOTE: we need $SSH_BIN to already be defined!! SSH_ARGS=$* SYNTAX="Syntax: $0 <ssh_binary>" NOTE="Note: SSH_BIN must already be defined! " SYNTAX="Syntax: $0 <ssh args>" if test -z $SSH_BIN; then # tell the user how to use this script echo $NOTE echo $SYNTAX # exit abnormally exit 10 fi # Here's the main action of this script $SSH_BIN -o'StrictHostKeyChecking no' $SSH_ARGS # Exit normally exit 0 Index: sandweb-editor =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-editor,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- sandweb-editor 4 Mar 2003 07:19:45 -0000 1.1 +++ sandweb-editor 1 Apr 2003 01:21:40 -0000 1.2 @@ -7,5 +7,5 @@ # Made for the SandWeb project - http://sandweb.sf.net -# We need EDITED_FILE to be defined already! +# We need MESSAGE_FILE to be defined already! EDITED_FILE=$1 Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.11 retrieving revision 1.12 diff -U2 -r1.11 -r1.12 --- sandweb-expect 23 Jan 2003 08:16:49 -0000 1.11 +++ sandweb-expect 1 Apr 2003 01:21:40 -0000 1.12 @@ -18,5 +18,4 @@ spawn /bin/sh -c $vcs_command - set timeout 10 expect { @@ -25,17 +24,4 @@ eof { exit 0 } - } - - expect { - "Are you sure" { send "yes\r" } - "password:" { send "$vcs_password\r" } - "denied" { exit 2 } - eof { exit 0 } - } - - expect { - "password:" { send "$vcs_password\r" } - "denied" { exit 2 } - eof { exit 0 } } |