From 2259758674f6b5f3a93c274909a574ee8b2a50ee Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 12 Feb 2007 18:00:56 +0000 Subject: Correct installation bug: Warning: fopen(/service/tinydns/root/data): failed to open stream: No such file or directory in /usr/local/pkg/tinydns.inc on line 255 --- packages/tinydns/tinydns.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 03e99e57..4cb6c316 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -253,7 +253,10 @@ function tinydns_create_zone_file() { unlink("/tmp/config.cache"); parse_config(true); config_lock(); - exec("rm -f /service/tinydns/root/data"); + if(file_exists("/service/tinydns/root/data")) + exec("rm -f /service/tinydns/root/data"); + if(!isdir("/service/tinydns/root")) + return; $fd = fopen("/service/tinydns/root/data", "w"); if(!$fd) { log_error("Could not open /service/tinydns/root/data for writing."); -- cgit v1.2.3