aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-bind-include.pl
diff options
context:
space:
mode:
authorJoachim Tingvold <joachim@tingvold.com>2015-03-21 18:45:16 +0100
committerJoachim Tingvold <joachim@tingvold.com>2015-03-21 18:45:16 +0100
commit6c6d3763980179ef02554c2f4b0afb3065262e7b (patch)
treed16e4bc4ecb8cdee10bd9850629f6d3997029414 /tools/make-bind-include.pl
parentd5c0e6ac02bd4bb1832434ef3fa502a21ac48432 (diff)
Move rest of the bootstrap-files.
Diffstat (limited to 'tools/make-bind-include.pl')
-rwxr-xr-xtools/make-bind-include.pl51
1 files changed, 0 insertions, 51 deletions
diff --git a/tools/make-bind-include.pl b/tools/make-bind-include.pl
deleted file mode 100755
index d688dec..0000000
--- a/tools/make-bind-include.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -I /root/tgmanage
-
-# TODO: Port this to the "master|slave base" parameter syntax!
-
-use strict;
-
-unless ( (($#ARGV == 0 ) || ( $#ARGV == 1))
- && (( $ARGV[0] eq "master" ) || ( $ARGV[0] eq "slave" )) )
-{
- print STDERR "Invalid usage!\ncat netnames.txt | $0 <master|slave> [basedir]\n";
- exit 1;
-}
-
-my $role = $ARGV[0];
-
-my $base = "/etc";
-$base = $ARGV[1] if $#ARGV == 1;
-$base .= "/" if not $base =~ m/\/$/ and not $base eq "";
-
-my $bind_base = $base . "bind/";
-my $masterinclude = $bind_base . "named.master-include.conf";
-my $slaveinclude = $bind_base . "named.slave-include.conf";
-
-my $glob;
-my @configs;
-
-if ( $role eq "master" )
-{
- $glob = $bind_base . "conf-master/*.conf";
- @configs = glob($glob);
-
- open CONF, ">" . $masterinclude or die ( $! . " " . $masterinclude);
- foreach my $config ( @configs )
- {
- print CONF "include \"" . $config . "\";\n";
- }
- close CONF;
-}
-
-if ( $role eq "slave" )
-{
- $glob = $bind_base . "conf-slave/*.conf";
- @configs = glob($glob);
-
- open CONF, ">" . $slaveinclude or die ( $! . " " . $slaveinclude);
- foreach my $config ( @configs )
- {
- print CONF "include \"" . $config . "\";\n";
- }
- close CONF;
-}