Posted to tcl by aspect at Tue Feb 19 10:53:42 GMT 2013view raw

  1. 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"
  2.  
  3. #set timeout $XPCT_TIMEOUT
  4.  
  5. expect {
  6. "assword:" {
  7. puts "got 'assword:'"
  8. send "$UPASS\r"
  9. exp_continue
  10. }
  11. " $UNAME:" {
  12. puts "got ' $UNAME:'"
  13. send "$UPASS\r"
  14. exp_continue
  15. }
  16. timeout {
  17. puts "got timeout"
  18. exit 2
  19. }
  20. eof {
  21. puts "got eof"
  22. }
  23. }
  24.  
  25. puts "expect block finished"
  26.