Show
Ignore:
Timestamp:
03/22/08 14:24:45 (5 years ago)
Author:
mizzy
Message:

lang/perl/Archer: Plugin::Exec::Remote で、 user 指定がない場合に sudo をつけないようにした

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Archer/trunk/lib/Archer/Plugin/Exec/Remote.pm

    r3667 r8268  
    77    my ($self, $cmd, $args) = @_; 
    88 
    9     my $real_command = "sudo -u $self->{config}->{user} ssh $self->{server} $cmd"; 
     9    my $real_command = "ssh $self->{server} $cmd"; 
     10    $real_command = "sudo -u $self->{config}->{user} $real_command" if $self->{config}->{user}; 
    1011    $self->log(debug => "real execute: $real_command"); 
    1112