From 56619cc2b97abef4248ea2058fe17c814c20238d Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 29 Mar 2010 13:58:45 +0000 Subject: This code does not need rw access. --- config/tinydns/tinydns.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/tinydns') diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc index 18d522f4..ba616846 100644 --- a/config/tinydns/tinydns.inc +++ b/config/tinydns/tinydns.inc @@ -323,16 +323,17 @@ function tinydns_get_backup_record($record) { function tinydns_setup_ping_items() { global $g, $config; + if(!$config['installedpackages']['tinydnsdomains']) return; $wanif = get_real_wan_interface(); $ip = find_interface_ip($wanif); - conf_mount_rw(); + $processed = array(); /* XXX: make this work with other packages */ - $fd = fopen("/var/db/pkgpinghosts", "w"); + $fd = fopen("{$g['vardb_path']}/pkgpinghosts", "w"); if(!$fd) { - log_error("Could not open /var/db/pkgpinghosts for writing."); + log_error("Could not open {$g['vardb_path']}/pkgpinghosts for writing."); return; } config_lock(); @@ -379,7 +380,6 @@ function tinydns_setup_ping_items() { } fclose($fd); config_unlock(); - conf_mount_ro(); } function tinydns_create_zone_file() { -- cgit v1.2.3