From c85f9ce9f56aa4ba561400acb32ebd786d9b7eec Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Fri, 21 Sep 2007 22:36:33 +0000 Subject: [PATCH 1/1] - allow config file to not exist. Closes: #274528. --- debian/changelog | 1 + scripts/named-conf | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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>)) { -- 2.30.2