Merge branch 'master' of github.com:duncs/clusterssh into getopt

This commit is contained in:
Duncan Ferguson 2014-05-17 17:32:23 +01:00
commit b54863993d
7 changed files with 27 additions and 10 deletions

View file

@ -3,7 +3,7 @@ package App::ClusterSSH;
use 5.008.004;
use warnings;
use strict;
use version; our $VERSION = version->new('4.02_03');
use version; our $VERSION = version->new('4.02_04');
use Carp;
@ -422,12 +422,14 @@ sub resolve_names(@) {
my $hostobj = gethostbyname($dirty);
if ( defined($hostobj) ) {
my @alladdrs = map { inet_ntoa($_) } @{ $hostobj->addr_list };
$self->cluster->register_tag( $dirty, @alladdrs );
if ( $#alladdrs > 0 ) {
$self->cluster->register_tag( $dirty, @alladdrs );
logmsg( 3, 'Expanded to ',
$self->cluster->get_tag($dirty) );
join(' ', $self->cluster->get_tag($dirty) ) );
@tag_list = $self->cluster->get_tag($dirty);
}
else {
# don't expand if there is only one record found
logmsg( 3, 'Only one A record' );
}
}
@ -1944,6 +1946,11 @@ sub run {
$self->config->load_configs( $options{'config-file'} );
if ( $options{title} ) {
$self->config->{title} = $options{title};
logmsg( 2, "Title: " . $self->config->{title} );
}
if ( $options{use_all_a_records} ) {
$self->config->{use_all_a_records}
= !$self->config->{use_all_a_records} || 0;