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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 |
56 |
if [board_info $hostname exists fileid] { |
if [board_info $hostname exists fileid] { |
57 |
unset board_info($hostname,fileid) |
unset board_info($hostname,fileid) |
58 |
} |
} |
59 |
|
|
60 |
spawn $RSH $rsh_useropts $hostname |
spawn $RSH $rsh_useropts $hostname |
61 |
if { $spawn_id < 0 } { |
if { $spawn_id < 0 } { |
62 |
perror "invalid spawn id from $RSH" |
perror "invalid spawn id from $RSH" |
133 |
} |
} |
134 |
incr tries |
incr tries |
135 |
} |
} |
136 |
|
|
137 |
if { $result < 0 } { |
if { $result < 0 } { |
138 |
# perror "$RSH: couldn't connect after $tries tries." |
# perror "$RSH: couldn't connect after $tries tries." |
139 |
close -i $spawn_id |
close -i $spawn_id |
227 |
|
|
228 |
# |
# |
229 |
# Execute "$cmd $args[0]" on $boardname. |
# Execute "$cmd $args[0]" on $boardname. |
230 |
# |
# |
231 |
proc rsh_exec { boardname cmd args } { |
proc rsh_exec { boardname cmd args } { |
232 |
if { [llength $args] > 0 } { |
if { [llength $args] > 0 } { |
233 |
set pargs [lindex $args 0] |
set pargs [lindex $args 0] |
252 |
} else { |
} else { |
253 |
set RSH [board_info $boardname rsh_prog] |
set RSH [board_info $boardname rsh_prog] |
254 |
} |
} |
255 |
|
|
256 |
if [board_info $boardname exists username] { |
if [board_info $boardname exists username] { |
257 |
set rsh_useropts "-l [board_info $boardname username]" |
set rsh_useropts "-l [board_info $boardname username]" |
258 |
} else { |
} else { |