mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-01 18:37:55 +00:00
parallel: Give warning if hostgroup is unknown, and run it anyway.
This commit is contained in:
parent
95958b623a
commit
2aeb79bfe0
|
@ -3375,6 +3375,7 @@ sub new {
|
||||||
my $string = $sshlogin_string;
|
my $string = $sshlogin_string;
|
||||||
# An SSHLogin is always in the hostgroup of its $string-name
|
# An SSHLogin is always in the hostgroup of its $string-name
|
||||||
$hostgroups{$string} = 1;
|
$hostgroups{$string} = 1;
|
||||||
|
@Global::hostgroups{keys %hostgroups} = values %hostgroups;
|
||||||
my @unget = ();
|
my @unget = ();
|
||||||
my $no_slash_string = $string;
|
my $no_slash_string = $string;
|
||||||
$no_slash_string =~ s/[^-a-z0-9:]/_/gi;
|
$no_slash_string =~ s/[^-a-z0-9:]/_/gi;
|
||||||
|
@ -7450,6 +7451,10 @@ sub new {
|
||||||
if($orig =~ s:@(.+)::) {
|
if($orig =~ s:@(.+)::) {
|
||||||
# We found hostgroups on the arg
|
# We found hostgroups on the arg
|
||||||
@hostgroups = split(/\+/, $1);
|
@hostgroups = split(/\+/, $1);
|
||||||
|
if(not grep { defined $Global::hostgroups{$_} } @hostgroups) {
|
||||||
|
::warning("No such hostgroup (@hostgroups)\n");
|
||||||
|
@hostgroups = (keys %Global::hostgroups);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bless {
|
return bless {
|
||||||
|
|
Loading…
Reference in a new issue