From 584a001cfec77f210984b28666bac62ebd7365c9 Mon Sep 17 00:00:00 2001 From: Goffredo Andreone Date: Thu, 12 Apr 2007 00:10:28 +0000 Subject: Test for a succesful installation of tinydns server by checking for /service/tinydns/root directory instead of /service/tinydns/. Install tinydns server on local host unless a different IP is entered. --- packages/tinydns/tinydns.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 072ed20a..43da9646 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -141,11 +141,10 @@ function tinydns_custom_php_changeip_command() { $dnscacheip = $ip; $dnsuserip = $arr[0]; -/* For now force $dnsserverip to to 127.0.0.1 when registration of 'local' DNS data is required */ +/* For now force $dnsserverip to to 127.0.0.1 unless a separate IP is specified */ $localhost = "127.0.0.1"; - if($config['installedpackages']['tinydns']['config'][0]['enableforwarding']) - $dnsserverip = $localhost; - if($config['installedpackages']['tinydns']['config'][0]['ipaddress'] != $localhost) + $dnsserverip = $localhost; + if($config['installedpackages']['tinydns']['config'][0]['ipaddress'] != $localhost AND $config['installedpackages']['tinydns']['config'][0]['ipaddress'] != "") $dnsserverip = $config['installedpackages']['tinydns']['config'][0]['ipaddress']; if($config['installedpackages']['tinydns']['config'][0]['regdhcpstatic'] OR $config['installedpackages']['tinydns']['config'][0]['regdhcp']) $dnsserverip = $localhost; @@ -155,7 +154,7 @@ function tinydns_custom_php_changeip_command() { /* setup daemon tools service area */ if(!is_dir("/service")) exec("/bin/mkdir /service"); - if(!is_dir("/service/tinydns")){ + if(!is_dir("/service/tinydns/root")){ exec("/usr/sbin/pw useradd Gtinydns"); exec("/usr/sbin/pw useradd Gdnslog"); exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$dnsserverip}"); -- cgit v1.2.3