Make use of find_binary if not set in config

If comms command isnt set then find the path to the binary
This commit is contained in:
Duncan Ferguson 2011-11-17 22:51:54 +00:00
parent 70bfa5b1c6
commit 99b908a64f
2 changed files with 6 additions and 0 deletions

View file

@ -86,6 +86,10 @@ sub new {
$self->{comms} = 'ssh';
}
if($self->{comms} && (! $self->{ $self->{comms} } || ! -e $self->{ $self->{comms} } ) ) {
$self->{ $self->{comms} } = $self->find_binary( $self->{ comms } );
}
$self->{title} = uc($Script);
return $self->validate_args(%args);