From: ianmdlvl Date: Fri, 21 Sep 2007 22:36:33 +0000 (+0000) Subject: - allow config file to not exist. Closes: #274528. X-Git-Tag: debian_version_4_1_22~13 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=c85f9ce9f56aa4ba561400acb32ebd786d9b7eec - allow config file to not exist. Closes: #274528. --- diff --git a/debian/changelog b/debian/changelog index d0e3dfa..e2ef1c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ chiark-utils (4.1.22) unstable; urgency=low - new allow-indirect-glue directive - new forbid-slave directive - remove incorrect references to SOA ORIGIN - should be MNAME + - allow config file to not exist. Closes: #274528. -- diff --git a/scripts/named-conf b/scripts/named-conf index 53d6a75..c9ae98d 100755 --- a/scripts/named-conf +++ b/scripts/named-conf @@ -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>)) {