[freeside-commits] branch FREESIDE_4_BRANCH updated. 41e1321406208cc6a3ddf306a75251898d89b697
Ivan Kohler
ivan at freeside.biz
Wed Jul 3 11:26:14 AKDT 2024
The branch, FREESIDE_4_BRANCH has been updated
via 41e1321406208cc6a3ddf306a75251898d89b697 (commit)
from 379df33385e9519bd43abc0f976e3d170072ad7c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 41e1321406208cc6a3ddf306a75251898d89b697
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Jul 3 12:26:13 2024 -0700
BIND local_zonepath override
diff --git a/FS/FS/part_export/bind.pm b/FS/FS/part_export/bind.pm
index 1ef7b6598..dd60b2a28 100644
--- a/FS/FS/part_export/bind.pm
+++ b/FS/FS/part_export/bind.pm
@@ -11,6 +11,8 @@ tie %options, 'Tie::IxHash',
default=> '/etc/bind/named.conf' },
'zonepath' => { label => 'path to zone files',
default=> '/etc/bind/', },
+ 'local_zonepath'=>{ label => 'path to zone files in named.conf (optional override)',
+ },
'bind_release' => { label => 'ISC BIND Release',
type => 'select',
options => [qw(BIND8 BIND9)],
diff --git a/bin/bind.export b/bin/bind.export
index a3bbd1ac5..9c5130b11 100755
--- a/bin/bind.export
+++ b/bin/bind.export
@@ -20,10 +20,10 @@ mkdir $spooldir, 0700 unless -d $spooldir;
my @exports = qsearch('part_export', { 'exporttype' => 'bind' } );
my @sexports = qsearch('part_export', { 'exporttype' => 'bind_slave' } );
-my $rsync = File::Rsync->new({
+my $rsync = File::Rsync->new(
rsh => 'ssh',
# dry_run => 1,
-});
+);
foreach my $export ( @exports ) {
@@ -50,7 +50,8 @@ foreach my $export ( @exports ) {
close CONF_HEADER;
}
- my $zonepath = $export->option('zonepath');
+ my $zonepath = $export->option('local_zonepath')
+ || $export->option('zonepath');
$zonepath =~ s/\/$//;
my @svc_domain = $export->svc_x;
@@ -112,18 +113,18 @@ END
}
- $rsync->exec( {
+ $rsync->exec(
src => "$prefix/",
recursive => 1,
dest => "root\@$machine:$zonepath/",
exclude => [qw( *.import named.conf.HEADER named.conf )],
- } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
+ ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- $rsync->exec( {
+ $rsync->exec(
src => "$prefix/named.conf",
dest => "root\@$machine:". $export->option('named_conf'),
- } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
+ ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
ssh("root\@$machine", "$ndc_cmd reload");
@@ -177,10 +178,10 @@ END
}
- $rsync->exec( {
+ $rsync->exec(
src => "$prefix/named.conf",
dest => "root\@$machine:". $sexport->option('named_conf'),
- } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
+ ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
ssh("root\@$machine", "$ndc_cmd reload");
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_export/bind.pm | 2 ++
bin/bind.export | 19 ++++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
More information about the freeside-commits
mailing list