dnssec-sign
changeset 25 c02caf4e0eb6
parent 24 b1234b9824f0
child 27 d5337081ed02
--- a/dnssec-sign	Mon Aug 02 13:45:47 2010 +0200
+++ b/dnssec-sign	Wed Aug 04 11:27:21 2010 +0200
@@ -2,16 +2,21 @@
 
 use strict;
 use warnings;
+use FindBin;
 
-my @configs = qw(dnstools.conf /etc/dnstools.conf);
+
+# liest die Konfiguration ein
+my @configs = ("$FindBin::Bin/dnstools.conf", "/etc/dnstools.conf");
+my %config;
 
-foreach (grep {-f} @configs) {
-	open(CONFIG, $_) or die "Can't open $_: $!\n";
+for (grep {-f} @configs) {
+        open(CONFIG, $_) or die "Can't open $_: $!\n";
 }
-die "Can't open config (searched: @configs)\n"
-	if not seek(CONFIG, 0, 0);
 
-my %config;
+unless (seek(CONFIG,0 ,0 )) {
+        die "Can't open config (searched: @configs)\n"
+}
+
 while (<CONFIG>) {
         chomp;
         s/#.*//;