Posted to tcl by aspect at Tue Feb 19 10:53:42 GMT 2013view pretty
spawn /usr/bin/ssh -tp $PORT $UNAME@$HOSTIP "cd $REMOTE_SYSROOT_PATH ; mkdir -p $SYSROOT_VERSION ; /usr/bin/sudo tar -xjvf $SYSROOT_ARCHIVE -C $SYSROOT_VERSION" #set timeout $XPCT_TIMEOUT expect { "assword:" { puts "got 'assword:'" send "$UPASS\r" exp_continue } " $UNAME:" { puts "got ' $UNAME:'" send "$UPASS\r" exp_continue } timeout { puts "got timeout" exit 2 } eof { puts "got eof" } } puts "expect block finished"