-Fix reverse zone filenames

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5658 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-04-02 18:09:58 +00:00
parent dbcb8cce6c
commit 81da8e0552

View File

@ -266,11 +266,13 @@ sub update_zones {
my $serial = ($mday * 100) + (($mon + 1) * 10000) + (($year + 1900) * 1000000);
foreach $currzone (@neededzones) {
my $zonefilename = $currzone;
$zonefilename =~ s/\..*//; #compatible with bind.pm
if ($currzone =~ /IN-ADDR\.ARPA/) {
$currzone =~ s/\.IN-ADDR\.ARPA.*//;
my @octets = split/\./,$currzone;
$currzone = join('.',reverse(@octets));
$zonefilename = $currzone;
} else {
$zonefilename =~ s/\..*//; #compatible with bind.pm
}
unless (-f $dbdir."/db.$zonefilename") {
my $zonehdl;