aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorGoffredo Andreone <gandreone@pfsense.org>2007-04-12 00:10:28 +0000
committerGoffredo Andreone <gandreone@pfsense.org>2007-04-12 00:10:28 +0000
commit584a001cfec77f210984b28666bac62ebd7365c9 (patch)
tree19f10eb930ca27fa22092ebeb6189f39c613e43f /packages
parent678d510f1d3427ddfe05e5789baf2d37fa587e34 (diff)
downloadpfsense-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.
Diffstat (limited to 'packages')
-rw-r--r--packages/tinydns/tinydns.inc9
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}");