From patchwork Sun Mar 1 18:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Fitzenreiter X-Patchwork-Id: 2809 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48VsYg5JZBz3yBt for ; Sun, 1 Mar 2020 18:41:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48VsYd6QxYz1km; Sun, 1 Mar 2020 18:41:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48VsYd4DSGz301v; Sun, 1 Mar 2020 18:41:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48VsYb6qVxz2yxC for ; Sun, 1 Mar 2020 18:41:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48VsYb5Fx6z1kc; Sun, 1 Mar 2020 18:41:23 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1583088083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=AgqRaNskPGXB7E4RZiQmrM/VNt6J+q0iMzRsVfAo3oA=; b=tOYV0mgc5ww22KYAr0njdMjxlwrKmCcVHBZN3067yvkYLn1evlxYbXpnz3UTX91F/tUBxa 76gq52TkW9WasOAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1583088083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=AgqRaNskPGXB7E4RZiQmrM/VNt6J+q0iMzRsVfAo3oA=; b=TH/DFSi0y65jGPen4dcq095CoQuW/muW2DzXleLeruWuX+hFGl8XT780DW3dOFjUEPO/j+ 7WT6nXtYVyv8l/yWRbvA69k8P63ufObPonS6uyG0DitB9aLKgWHXkSa8fUbur2DWT0FvBq b3fV0lFvkYXMEwhvZx2RoaNirHlePAQhMi+GKqbEqnfV6XAL8g5c6ymTv0ep3yCjUI8EIq LLJS7z4auoikBzGMV2+oYtrYcFD7X78W0wWq93kfGZvsHEOgHaAypZwPF+rrYJ8f5qVNDg jIUyrQVh3yR3X7eEmE1xfV3T5BacBAX7W/slsBjKbWWxW6FDCGWaN8vJRfAYyg== From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 2/4] unbound: run "time-fix" before savesearch resolves Date: Sun, 1 Mar 2020 19:41:14 +0100 Message-Id: <20200301184116.15686-2-arne_f@ipfire.org> In-Reply-To: <20200301184116.15686-1-arne_f@ipfire.org> References: <20200301184116.15686-1-arne_f@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=arne_f@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arne Fitzenreiter Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Arne Fitzenreiter --- src/initscripts/system/unbound | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 507f589ca..7bf2ffc2c 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -587,7 +587,7 @@ case "$1" in sleep 1 $0 start ;; - reload|remove-forwarders) + reload|remove-forwarders|update-forwarders) # Update configuration files write_forward_conf write_hosts_conf @@ -595,6 +595,14 @@ case "$1" in # Call unbound-control and perform the reload /usr/sbin/unbound-control -q reload + # Dummy Resolve to wait for unbound + resolve "ping.ipfire.org" &>/dev/null + + if [ "$1" = "update-forwarders" ]; then + # Make sure DNS works at this point + fix_time_if_dns_fails + fi + # Update Safe Search rules if the system is online. if [ -e "/var/ipfire/red/active" ]; then update_safe_search @@ -605,9 +613,6 @@ case "$1" in statusproc /usr/sbin/unbound ;; - update-forwarders) - $0 reload - # Make sure DNS works at this point fix_time_if_dns_fails ;;