From e9999de7a8754d4091617997a52b775b1d4d3ad3 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 19 Apr 2021 18:46:04 -0700 Subject: [PATCH] Add API to get a quick list of files in a records file --- bind8/backup_config.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bind8/backup_config.pl b/bind8/backup_config.pl index a25953c53..4f7d42755 100755 --- a/bind8/backup_config.pl +++ b/bind8/backup_config.pl @@ -28,8 +28,12 @@ foreach my $z (@zones) { next if ($tv ne "master" && $tv ne "hint"); my $file = &find_value("file", $z->{'members'}); next if (!$file); - my @recs = &read_zone_file($file, $z->{'value'}); - push(@rv, map { $_->{'file'} } @recs); + if (&is_raw_format_records(&make_chroot($file))) { + push(@rv, $file); + } + else { + push(@rv, &files_in_zone_file($file)); + } } return map { &make_chroot($_) } &unique(@rv);