From: Rob H. <for...@us...> - 2002-06-05 02:07:37
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv11155/lib/SandWeb Modified Files: Shell.pm Log Message: fixed problem reported by Blake on the -devel list. just needed to be implemented correctly, depending on the presence of username/password to decide if we are doing SSH or not is dumb :P Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- Shell.pm 20 May 2002 23:34:52 -0000 1.9 +++ Shell.pm 5 Jun 2002 02:07:32 -0000 1.10 @@ -31,4 +31,6 @@ my $vcs_username = $args{'vcs_username'} || ''; my $vcs_password = $args{'vcs_password'} || ''; + my $unix = $args{'unix'} || ''; + my $vcs = $args{'vcs'} || ''; my $self = bless { @@ -38,4 +40,6 @@ 'vcs_username' => "$vcs_username", 'vcs_password' => "$vcs_password", + 'unix' => "$unix", + 'vcs' => "$vcs", }, $class; @@ -52,10 +56,12 @@ my $vcs_username = $self->{'vcs_username'}; my $vcs_password = $self->{'vcs_password'}; + my $unix = $self->{'unix'} || ''; + my $vcs = $self->{'vcs'} || ''; my $command = $args{'command'}; my $output; - if ( $system_username && $system_password ) { - if ( $vcs_username && $vcs_password ) { + if ( $unix ) { + if ( $vcs ) { my $raw_output = `$sandweb_expect unix_vcs $system_username $system_password \'$vcs_password\' $command`; $raw_output =~ s/ /\n/g; @@ -72,5 +78,5 @@ $output = join('', @lined_output); } - } elsif ( $vcs_username && $vcs_password ) { + } elsif ( $vcs ) { my $raw_output = `$sandweb_expect vcs \'$vcs_password\' "$command" 2>&1`; $raw_output =~ s/^M/\n/g; |