/[dejagnu]/dejagnu/lib/rlogin.exp
ViewVC logotype

Diff of /dejagnu/lib/rlogin.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by bje, Thu Aug 7 03:58:36 2003 UTC revision 1.7 by bje, Sat Aug 16 13:08:57 2003 UTC
# Line 4  Line 4 
4  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
5  # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or
6  # (at your option) any later version.  # (at your option) any later version.
7  #  #
8  # This program is distributed in the hope that it will be useful,  # This program is distributed in the hope that it will be useful,
9  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
10  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  # GNU General Public License for more details.  # GNU General Public License for more details.
12  #  #
13  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
14  # along with this program; if not, write to the Free Software  # along with this program; if not, write to the Free Software
15  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.    # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16    
17  # Please email any bugs, comments, and/or additions to this file to:  # Please email any bugs, comments, and/or additions to this file to:
18  # bug-dejagnu@gnu.org  # bug-dejagnu@gnu.org
# Line 45  proc rlogin_open { arg } { Line 45  proc rlogin_open { arg } {
45      } else {      } else {
46          set shell_prompt [board_info $arg shell_prompt]          set shell_prompt [board_info $arg shell_prompt]
47      }      }
48    
49      if [board_info $arg exists fileid] {      if [board_info $arg exists fileid] {
50          unset board_info($arg,fileid)          unset board_info($arg,fileid)
51      }      }
# Line 55  proc rlogin_open { arg } { Line 55  proc rlogin_open { arg } {
55      } else {      } else {
56          set RLOGIN [board_info $arg rlogin_prog]          set RLOGIN [board_info $arg rlogin_prog]
57      }      }
58        
59      # start connection and store the spawn_id      # start connection and store the spawn_id
60      verbose "Opening a $RLOGIN connection to $hostname" 2      verbose "Opening a $RLOGIN connection to $hostname" 2
61      spawn $RLOGIN $hostname      spawn $RLOGIN $hostname
# Line 64  proc rlogin_open { arg } { Line 64  proc rlogin_open { arg } {
64          return          return
65      }      }
66      set board_info($arg,fileid) $spawn_id      set board_info($arg,fileid) $spawn_id
67        
68      # Try to connect to the target. We give up after 3 attempts.      # Try to connect to the target. We give up after 3 attempts.
69      while { $tries <= 3 } {      while { $tries <= 3 } {
70          expect {          expect {
# Line 107  proc rlogin_open { arg } { Line 107  proc rlogin_open { arg } {
107              -re "Sorry, this system is engaged.*Connection closed.*$" {              -re "Sorry, this system is engaged.*Connection closed.*$" {
108                  warning "rlogin: system engaged."                  warning "rlogin: system engaged."
109              }              }
110              timeout     {              timeout     {
111                  warning "rlogin: timed out trying to connect."                  warning "rlogin: timed out trying to connect."
112              }              }
113              eof {              eof {
# Line 153  proc rlogin_spawn { dest cmdline } { Line 153  proc rlogin_spawn { dest cmdline } {
153                      set prefix "shell "                      set prefix "shell "
154                      set ok 1                      set ok 1
155                  }                  }
156                  -re ".*$shell_prompt" {                  -re ".*$shell_prompt" {
157                      set ok 1                      set ok 1
158                  }                  }
159                  default { }                  default { }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26