Bug #448
closed
Added by Henrik Kaare Poulsen over 15 years ago.
Updated over 15 years ago.
Description
snapshot 20100324-0246
After configuring TinyDNS from GUI, dnscache is not starting.
patch¶
# diff tinydns.inc.001 tinydns.inc
209,214c209,211
< if(!is_dir("/etc/dnscache{$dnsidx}")) {
< exec("mkdir /etc/dnscache{$dnsidx}");
< exec("/bin/ln -s /etc/dnscache{$dnsidx} /service/");
<
< }
< exec("/usr/local/bin/dnscache-conf Gdnscache Gdnslog /etc/dnscache{$dnsidx} {$dnscacheip}");
---
> exec("rm -rf /etc/dnscache{$dnsidx}");
> exec("/usr/local/bin/dnscache-conf Gdnscache Gdnslog /etc/dnscache{$dnsidx} {$dnscacheip}");
> exec("/bin/ln -s /etc/dnscache{$dnsidx} /service/");
- Status changed from New to Feedback
Slightly different patch committed.
Thank you.
- Status changed from Feedback to Resolved
I am sorry, but the issue does not seem to be fixed, even with the latest TinyDNS updates.
dnscache-conf fails if the etc/dnscache{$dnsidx} directory already exists.
Patch against current git¶
git diff 17ce09911ff4f18d5a744de01ed0da38760d47cf
diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc
index 5e73015..d44a68f 100644
--- a/config/tinydns/tinydns.inc
+++ b/config/tinydns/tinydns.inc
@@ -237,7 +237,6 @@ function tinydns_custom_php_changeip_command() {
$ipmask = $config['interfaces'][$dnsif]['subnet'];
$arr = tinydns_get_ip_subnet_arpa($dnscacheip, $ipmask);
$dnsuserip = $arr[0];
- exec("/bin/mkdir -p {$g['varetc_path']}/etc/dnscache{$dnsidx}");
exec("/usr/local/bin/dnscache-conf Gdnscache Gdnslog {$g['varetc_path']}/etc/dnscache{$dnsidx} {$dnscacheip}");
exec("/bin/ln -s {$g['varetc_path']}/etc/dnscache{$dnsidx} {$g['varrun_path']}/service/");
if (!is_dir("{$g['varetc_path']}/etc/dnscache{$dnsidx}/env/IP"))
- Status changed from Resolved to New
- Status changed from New to Feedback
This is already committed.
I concur. The issue is now fixed.
Thank you!
- Status changed from Feedback to Resolved
Also available in: Atom
PDF