2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Merge pull request #4552 from stanford-rc/named_includes

Check if the include line is already there before adding it to the file
This commit is contained in:
Yuan Bai 2017-12-20 11:21:39 +08:00 committed by GitHub
commit b3e235583f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
xCAT-server/lib/xcat/plugins/ddns.pm Executable file → Normal file
View File

@ -1281,10 +1281,13 @@ sub update_namedconf {
my @includes = split /[ ,]/, $site_entry;
foreach (@includes) {
if (defined($_)) {
push @newnamed, "include \"$_\";\n";
my $line = "include \"$_\";\n";
unless (grep{/$line/} @newnamed) {
push @newnamed, "include \"$_\";\n";
}
}
}
push @newnamed, "\n";
}
}
unless ($slave) {