mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-03 03:50:08 +00:00
Use xCAT::Utils:CheckVersion to compare BIND versions without using the version.pm
This commit is contained in:
parent
43c3a76891
commit
457da8b073
@ -2201,7 +2201,7 @@ sub CheckVersion
|
||||
my $index = 0;
|
||||
my $max_index = ($len_a > $len_b) ? $len_a : $len_b;
|
||||
|
||||
for ($index = 0 ; $index <= $max_index ; $index++)
|
||||
for ($index = 0 ; $index < $max_index ; $index++)
|
||||
{
|
||||
my $val_a = ($len_a < $index) ? 0 : $a[$index];
|
||||
my $val_b = ($len_b < $index) ? 0 : $b[$index];
|
||||
|
@ -1286,7 +1286,7 @@ sub update_namedconf {
|
||||
my $bind_version_cmd="/usr/sbin/named -v | cut -d' ' -f2 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+'";
|
||||
my @bind_version =xCAT::Utils->runcmd($bind_version_cmd, 0);
|
||||
# Turn off DNSSEC if running with bind vers 9.16.6 or higher
|
||||
if ((scalar @bind_version > 0) && (version->parse($bind_version[0]) >= version->parse(9.16.6))) {
|
||||
if ((scalar @bind_version > 0) && (xCAT::Utils::CheckVersion($bind_version[0], "9.16.6") >= 0)) {
|
||||
push @newnamed, "\tdnssec-enable no;\n";
|
||||
push @newnamed, "\tdnssec-validation no;\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user