diff options
author | Goffredo Andreone <gandreone@pfsense.org> | 2007-04-12 00:10:28 +0000 |
---|---|---|
committer | Goffredo Andreone <gandreone@pfsense.org> | 2007-04-12 00:10:28 +0000 |
commit | 584a001cfec77f210984b28666bac62ebd7365c9 (patch) | |
tree | 19f10eb930ca27fa22092ebeb6189f39c613e43f | |
parent | 678d510f1d3427ddfe05e5789baf2d37fa587e34 (diff) | |
download | pfsense-packages-584a001cfec77f210984b28666bac62ebd7365c9.tar.gz pfsense-packages-584a001cfec77f210984b28666bac62ebd7365c9.tar.bz2 pfsense-packages-584a001cfec77f210984b28666bac62ebd7365c9.zip |
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.
-rw-r--r-- | packages/tinydns/tinydns.inc | 9 |
1 files 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}"); |