This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via 642b831b72b42c7ecab4ac05828db2ebc29c3845 (commit)
via e24d6112bb364697d925ca436dddd5436448b477 (commit)
from 5edc06b701548df78adf746bb4023ef61460d957 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 642b831b72b42c7ecab4ac05828db2ebc29c3845
Merge: e24d611 5edc06b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Sun Oct 2 16:36:57 2016 +0200
Merge branch 'next' of git.ipfire.org:/pub/git/ipfire-2.x into next
commit e24d6112bb364697d925ca436dddd5436448b477
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Sun Oct 2 16:35:50 2016 +0200
index.cgi: display unbound dns servers
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/rootfiles/core/106/filelists/files | 1 +
html/cgi-bin/index.cgi | 20 +++++++-------------
src/initscripts/init.d/unbound | 2 ++
3 files changed, 10 insertions(+), 13 deletions(-)
Difference in files:
diff --git a/config/rootfiles/core/106/filelists/files b/config/rootfiles/core/106/filelists/files
index 3d8cf8d..3468c58 100644
--- a/config/rootfiles/core/106/filelists/files
+++ b/config/rootfiles/core/106/filelists/files
@@ -15,6 +15,7 @@ srv/web/ipfire/cgi-bin/dns.cgi
srv/web/ipfire/cgi-bin/dnsforward.cgi
srv/web/ipfire/cgi-bin/firewall.cgi
srv/web/ipfire/cgi-bin/hosts.cgi
+srv/web/ipfire/cgi-bin/index.cgi
srv/web/ipfire/cgi-bin/logs.cgi/log.dat
srv/web/ipfire/cgi-bin/pppsetup.cgi
srv/web/ipfire/cgi-bin/services.cgi
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
index eafbdb1..c142a65 100644
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -200,26 +200,20 @@ END
END
}
- my @dns_servers = ();
- foreach my $f ("${General::swroot}/red/dns1", "${General::swroot}/red/dns2") {
- open(DNS, "<$f");
- my $dns_server = <DNS>;
- close(DNS);
-
- chomp($dns_server);
- if ($dns_server) {
- push(@dns_servers, $dns_server);
- }
+ my $dns_servers;
+ if ( -e "${General::swroot}/red/dns" ) {
+ open (TMP, "<${General::swroot}/red/dns");
+ $dns_servers = <TMP>;
+ chomp($dns_servers);
+ close TMP;
}
- my $dns_servers_str = join(", ", @dns_servers);
-
print <<END;
<tr>
<td>
<b>$Lang::tr{'dns servers'}:</b>
</td>
<td style='text-align:center;'>
- $dns_servers_str
+ $dns_servers
</td>
<td></td>
</tr>
diff --git a/src/initscripts/init.d/unbound b/src/initscripts/init.d/unbound
index 4d2b266..dd5c85c 100644
--- a/src/initscripts/init.d/unbound
+++ b/src/initscripts/init.d/unbound
@@ -90,12 +90,14 @@ update_forwarders() {
boot_mesg "Configuring upstream name server(s): ${forwarders:1}" ${INFO}
echo_ok
+ echo "${forwarders}" > /var/ipfire/red/dns
unbound-control -q forward ${forwarders}
return 0
fi
fi
# If forwarders cannot be used we run in recursor mode
+ echo "local recursor" > /var/ipfire/red/dns
unbound-control -q forward off
}
hooks/post-receive
--
IPFire 2.x development tree