aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/tinydns/tinydns.inc5
1 files changed, 4 insertions, 1 deletions
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.");