--- a/dnssec-creatkey Mon Aug 02 13:45:47 2010 +0200
+++ b/dnssec-creatkey Wed Aug 04 11:27:21 2010 +0200
@@ -1,9 +1,21 @@
#!/usr/bin/perl -w
use strict;
+use FindBin;
+
+# liest die Konfiguration ein
+my @configs = ("$FindBin::Bin/dnstools.conf", "/etc/dnstools.conf");
my %config;
-open (CONFIG, "dnstools.conf");
+
+for (grep {-f} @configs) {
+ open(CONFIG, $_) or die "Can't open $_: $!\n";
+}
+
+unless (seek(CONFIG,0 ,0 )) {
+ die "Can't open config (searched: @configs)\n"
+}
+
while (<CONFIG>) {
chomp;
s/#.*//;