Commit 6a90ca88 authored by Robert Ricci's avatar Robert Ricci
Browse files

Fix a bug when the hosts file was in an unexpected order.

parent e305220a
......@@ -17,9 +17,9 @@ open(HOSTS,"/etc/hosts") or die "Unable to open /etc/hosts: $!\n";
while (<HOSTS>) {
my ($IP,@names) = split /\s+/;
my $firstname = shift @names;
if ($firstname =~ /^(.+)-(elink|elan|ecloud|elabc)/) {
if ($firstname =~ /^(.+)-(elink|elan|ecloud|elabc)$/) {
$elabips{$1} = $IP;
} elsif ($firstname =~ /^(.+)-(plink|plan|pcloud|plabc)/) {
} elsif ($firstname =~ /^(.+)-(plink|plan|pcloud|plabc)$/) {
$plabips{$1} = $IP;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment