aboutsummaryrefslogtreecommitdiffstats
path: root/config/tinydns/tinydns.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2012-01-07 23:10:01 -0500
committerChris Buechler <cmb@pfsense.org>2012-01-07 23:10:01 -0500
commit1bb5c3b793d6e5a9a6e444cf9a10971ff4f771a0 (patch)
treea68936462cace7649e17ddb8fd10c893b5ac7e2f /config/tinydns/tinydns.inc
parentfbd88170b13f0632f84725370bd0bce43300a2e0 (diff)
downloadpfsense-packages-1bb5c3b793d6e5a9a6e444cf9a10971ff4f771a0.tar.gz
pfsense-packages-1bb5c3b793d6e5a9a6e444cf9a10971ff4f771a0.tar.bz2
pfsense-packages-1bb5c3b793d6e5a9a6e444cf9a10971ff4f771a0.zip
just because you have the DNS cache enabled doesn't necessarily mean you want your resolv.conf messed with. Leave that up to the user and what they configure in System>General Setup. Remove a never used and unnecessary function while here.
Diffstat (limited to 'config/tinydns/tinydns.inc')
-rw-r--r--config/tinydns/tinydns.inc44
1 files changed, 1 insertions, 43 deletions
diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc
index bf0cb4b8..ef6513ee 100644
--- a/config/tinydns/tinydns.inc
+++ b/config/tinydns/tinydns.inc
@@ -235,9 +235,6 @@ function tinydns_custom_php_changeip_command() {
if(!empty($config['installedpackages']['tinydns']['config'][0]['enableforwarding'])) {
$interfaces = explode(",", $config['installedpackages']['tinydns']['config'][0]['interface']);
- exec("/bin/cp {$g['varetc_path']}/resolv.conf {$g['varetc_path']}/resolv.conf.original");
- exec("/bin/cp {$g['varetc_path']}/resolv.conf {$g['varetc_path']}/resolv.conf.dnscache");
- exec("echo domain {$config['system']['domain']} > {$g['varetc_path']}/resolv.conf");
exec("rm -rf {$g['varetc_path']}/dnscache* {$g['varrun_path']}/service/dnscache*");
foreach ($interfaces as $dnsidx => $dnsif) {
$dnscacheif = convert_friendly_interface_to_real_interface_name($dnsif);
@@ -269,12 +266,9 @@ function tinydns_custom_php_changeip_command() {
exec("/bin/mkdir -p {$g['varetc_path']}/dnscache{$dnsidx}/root/ip");
exec("/usr/bin/touch {$g['varetc_path']}/dnscache{$dnsidx}/root/ip/{$dnsuserip}");
tinydns_create_soa_domain_list($dnsserverip, $dnsidx);
- exec("echo nameserver {$dnscacheip} >> {$g['varetc_path']}/resolv.conf");
}
exec("/usr/bin/killall -9 dnscache");
} else {
- if(file_exists("{$g['varetc_path']}/resolv.conf.original"))
- exec("/bin/cp {$g['varetc_path']}/resolv.conf.original {$g['varetc_path']}/resolv.conf");
$interfaces = explode(",", $$config['installedpackages']['tinydns']['config'][0]['interface']);
foreach ($interfaces as $dnsidx => $dnsif) {
if(is_dir("{$g['varetc_path']}/dnscache{$dnsidx}"))
@@ -1188,42 +1182,6 @@ function tinydns_create_soa_domain_list($dnsserverip, $index = 0) {
}
}
-/* This function is not called */
-/* At the moment there is no tagging of DNSroute to a WAN port. It needs to be added */
-function tinydns_register_forwarding_servers() {
- global $g;
-
- $fr = fopen("{$g['varetc_path']}/resolv.conf", "r");
- if (! $fr) {
- printf("Error: cannot open resolv.conf in tinydns_register_forwarding_servers().\n");
- return 1;
- }
- $lip = strlen("nameserver") + 1;
- $j = 0;
- $nsrecords = "";
- $arecords = "";
- while (!feof($fr)) {
- $routers = fgets($fr, 4096);
- $discard = ($routers[0] == "\n");
- if(!$discard) {
- if ($routerip = strstr($routers,"nameserver")) {
- $routerip = substr($routerip,$lip);
- if($routerip) {
- $j += 1;
- $routerfqdn = "DNSroute-{$j}.wan{$j}";
- $routerns = "&::{$routerfqdn}";
- $routera = "={$routerfqdn}:{$routerip}";
- $nsrecords .= $routerns . "\n";
- $arecords .= $routera;
- }
- }
- }
- }
- fclose($fr);
- $dnsroutes ="{$nsrecords}{$arecords}";
- return $dnsroutes;
-}
-
function tinydns_register_root_servers() {
$rootservers =<<<EOD
&::a.root-servers.net
@@ -1306,4 +1264,4 @@ function tinydns_cleanup_addedit_form_record() {
}
}
-?>
+?> \ No newline at end of file