From 1b8d9b1088c14364879c348a94bc5b42fab003da Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 16 Feb 2008 23:14:05 +1300 Subject: [PATCH] Make use of $c->{'remote'}{'ssh'} consistent. --- mirror | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mirror b/mirror index e05ccd9..27d123f 100644 --- a/mirror +++ b/mirror @@ -159,7 +159,7 @@ sub load_config { die_gracefully("You've specified the remote host, but not the remote login.") unless defined $c->{'remote'}{'login'}; - $c->{'rmtssh'} = "ssh " + $c->{'remote'}{'ssh'} = "ssh " . (defined $c->{'remote'}{'sshargs'} ? $c->{'remote'}{'sshargs'} . ' ' : '') . " -l $c->{'remote'}{'login'} $c->{'remote'}{'host'}"; } @@ -271,8 +271,8 @@ sub _docleanup { sub test { my ($test) = shift; - if (defined $c->{rmtssh}) { - system("$c->{rmtssh} [ $test ]"); + if (defined $c->{'remote'}{'ssh'}) { + system("$c->{'remote'}{'ssh'} [ $test ]"); return ($? >> 8); } else { @@ -285,8 +285,8 @@ sub test { sub run_and_check { my ($cmd, $die) = shift; - $cmd = "$c->{$rmtssh} \"$cmd\"" - if defined $c->{rmtssh}; + $cmd = "$c->{'remote'}{'ssh'} \"$cmd\"" + if defined $c->{'remote'}{'ssh'}; if (defined $DEBUG) { print "Want to run: $cmd\n"; @@ -308,8 +308,8 @@ sub run_and_check { sub run_and_return { my ($cmd, $die) = shift; - $cmd = "$c->{$rmtssh} \"$cmd\"" - if defined $c->{rmtssh}; + $cmd = "$c->{'remote'}{'ssh'} \"$cmd\"" + if defined $c->{'remote'}{'ssh'}; my $output = `$cmd`; if ($? >> 8 != 0) { -- 2.30.2