chiark / gitweb /
- allow config file to not exist. Closes: #274528.
[chiark-utils.git] / scripts / named-conf
index 53d6a75300184f80d804356471a881d4d7662cca..c9ae98de6b08d2c52db8e3e0decf58ddffa1642d 100755 (executable)
@@ -224,7 +224,11 @@ sub read_config ($) {
        $mod,$dir,$prefix,$suffix,$subfile,$lprefix,$lsuffix,$zf);
     local ($_);
 
-    $fh= new IO::File $if,'r' or cfg_fail("open $if:\n $!");
+    $fh= new IO::File $if,'r';
+    unless ($fh) {
+       return if $! == &ENOENT;
+       cfg_fail("open $if:\n $!");
+    }
     $before= '';
     for (;;) {
        if (!defined($_= <$fh>)) {