public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 642b831b72b42c7ecab4ac05828db2ebc29c3845
Date: Sun, 02 Oct 2016 15:39:28 +0100	[thread overview]
Message-ID: <20161002143928.8A8A41078E81@git01.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3578 bytes --]

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

                 reply	other threads:[~2016-10-02 14:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161002143928.8A8A41078E81@git01.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox