Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
92fc62f4
Commit
92fc62f4
authored
Dec 14, 2005
by
Kirk Webb
Browse files
Doh! sshtb needs to exit with the status of the child process when trying sshv2 and able to connect.
parent
d8b80433
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/sshtb.in
View file @
92fc62f4
...
...
@@ -177,12 +177,14 @@ if (grep {/Protocol/ || /-[12]/} @args) {
warn
"
*** $0: waitpid() returned
$kidpid
. Exiting.
";
sighandler
();
}
my
$kidstatus
=
$?
;
if
(
$kidstatus
>>
8
==
255
)
{
my
$kidstatus
=
$?
>>
8
;
if
(
$kidstatus
==
255
)
{
# XXX: May not be due to v2 vs. v1, but there is no
# way to differentiate from the exit value.
print
"
Protocol 2 failed: Trying ssh protocol 1
\n
"
if
$debug
;
exec
(
$SSH
,
"
-o Protocol=1
",
@cmdargs
);
}
else
{
exit
$kidstatus
;
}
}
else
{
exec
(
$SSH
,
"
-o Protocol=2
",
@cmdargs
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment