From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 4a791d2ab924129ff3dacc1bd47da4533badc33a Date: Tue, 21 Jan 2020 19:33:59 +0000 Message-ID: <482Jcm056cz2yHB@people01.haj.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6421970017467420722==" List-Id: --===============6421970017467420722== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 4a791d2ab924129ff3dacc1bd47da4533badc33a (commit) via ab4ef40f2bfb4bd5de22c1d6ef5213c60602b329 (commit) via 26eab1fe3e5ed74013420e077a112a012eeab4f6 (commit) from b3e3c818958f86ae2612d626f26232209a2b5ee9 (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 4a791d2ab924129ff3dacc1bd47da4533badc33a Author: Stefan Schantl Date: Tue Jan 21 18:27:13 2020 +0100 dns.cgi: Display when unbound is running in recursor mode. =20 Signed-off-by: Stefan Schantl Reviewed-by: Peter M=C3=BCller Signed-off-by: Arne Fitzenreiter commit ab4ef40f2bfb4bd5de22c1d6ef5213c60602b329 Author: Stefan Schantl Date: Tue Jan 21 17:13:06 2020 +0100 unbound: Use recursor mode if no nameservers are configured =20 Signed-off-by: Stefan Schantl Signed-off-by: Arne Fitzenreiter commit 26eab1fe3e5ed74013420e077a112a012eeab4f6 Author: Michael Tremer Date: Mon Jan 20 17:23:12 2020 +0000 azure: Abort script when no instance ID can be retrieved =20 We cannot reliably determine if a system is running on Hyper-V on a private server or on the Azure Cloud. =20 Therefore, we will have to try to retrieve an IP address with DHCP and try to connect to the metadata service. If either of those things is not successful, we will just continue with the setup process as usual. =20 So cloud instances should be automatically configured now and all other systems will continue to boot and call the setup wizard as usual. =20 Fixes: #12272 Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter ----------------------------------------------------------------------- Summary of changes: html/cgi-bin/dns.cgi | 2 +- langs/en/cgi-bin/en.pl | 1 + src/initscripts/helper/azure-setup | 3 +++ src/initscripts/system/unbound | 30 ++++++++++++++++++++---------- 4 files changed, 25 insertions(+), 11 deletions(-) Difference in files: diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 11415cdf8..d4278d8b9 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -711,7 +711,7 @@ print < -
$Lang::tr{'guardian no entries'}
+
$Lang::tr{'dns recursor mode'}
=20 diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index c0a69cffe..dfc7e013f 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -862,6 +862,7 @@ 'dns no address given' =3D> 'No IP Address given.', 'dns no tls hostname given' =3D> 'No TLS hostname given.', 'dns proxy server' =3D> 'DNS Proxy Server', +'dns recursor mode' =3D> 'Running in Recursor mode.', 'dns saved' =3D> 'Successfully saved!', 'dns saved txt' =3D> 'The two entered DNS server addresses have been saved s= uccessfully.
You have to reboot or reconnect that the changes have effec= t!', 'dns server' =3D> 'DNS Server', diff --git a/src/initscripts/helper/azure-setup b/src/initscripts/helper/azur= e-setup index d497c43b2..d84ec3aca 100644 --- a/src/initscripts/helper/azure-setup +++ b/src/initscripts/helper/azure-setup @@ -58,6 +58,9 @@ prefix2netmask() { =20 import_azure_configuration() { local instance_id=3D"$(get compute/vmId)" + if [ -z "${instance_id}" ]; then + return 0 + fi =20 boot_mesg "Importing Microsoft Azure configuration for instance ${instance_= id}..." =20 diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 7df50e9d4..3322c15b5 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -162,19 +162,29 @@ write_forward_conf() { done fi =20 - echo "forward-zone:" - echo " name: \".\"" + # Read name servers. + nameservers=3D$(read_name_servers) =20 - # Force using TLS only - if [ "${PROTO}" =3D "TLS" ]; then - echo " forward-tls-upstream: yes" + # Only write forward zones if any nameservers are configured. + # + # Otherwise fall-back into recursor mode. + if [ -n "${nameservers}" ]; then + + echo "forward-zone:" + echo " name: \".\"" + + # Force using TLS only + if [ "${PROTO}" =3D "TLS" ]; then + echo " forward-tls-upstream: yes" + fi + + # Add upstream name servers + local ns + for ns in ${nameservers}; do + echo " forward-addr: ${ns}" + done fi =20 - # Add upstream name servers - local ns - for ns in $(read_name_servers); do - echo " forward-addr: ${ns}" - done ) > /etc/unbound/forward.conf } =20 hooks/post-receive -- IPFire 2.x development tree --===============6421970017467420722==--