From 9f9dbbcd929dff558b1c855c2a2fbd94ace007ce Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 6 Feb 2007 19:49:27 +0000 Subject: * Reparse config.xml before writing out file. * Update TINYDNS ip upon change --- packages/tinydns/tinydns.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 88736e16..374b914f 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -140,6 +140,7 @@ function tinydns_custom_php_changeip_command() { exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$ip}"); exec("/bin/mkdir /service"); exec("/bin/ln -s /etc/tinydns /service/"); + exec("echo $ip > /service/tinydns/env/IP"); conf_mount_ro(); filter_configure(); } @@ -248,6 +249,9 @@ function tinydns_create_zone_file() { global $g, $config; conf_mount_rw(); config_lock(); + if(file_exists("/tmp/config.cache")) + unlink("/tmp/config.cache"); + parse_config(true); exec("rm -f /service/tinydns/root/data"); $fd = fopen("/service/tinydns/root/data", "w"); if(!$fd) { -- cgit v1.2.3