--- a/mkready Wed Jul 28 14:14:47 2010 +0200
+++ b/mkready Thu Jul 29 14:19:56 2010 +0200
@@ -5,17 +5,18 @@
my $bind_dir = "/etc/bind";
my $conf_dir = "/etc/bind/zones.d";
my $master_dir = "/etc/bind/master";
-chomp (my @domains = `ls $master_dir`);
chomp (my @conf_dir_files = `ls $conf_dir`);
# prueft jede domain, die ein verzeichnis in $master_dir hat, ob es eine
# datei $zone_file.signed gibt und ob diese datei in $config_file eingetragen
# ist.
# passt die eintraege in $config_file falls noetig an.
-foreach (@domains) {
- my $domain = $_;
- my $zone_file = "$master_dir/$domain/$domain";
- my $conf_file = "$conf_dir/$domain";
+for (<$master_dir/*>) {
+ s#($master_dir/)(.*)#$2#;
+ my $zone = $_;
+
+ my $zone_file = "$master_dir/$zone/$zone";
+ my $conf_file = "$conf_dir/$zone";
my @c_content;
if (-e "$zone_file.signed") {