From patchwork Sat Feb 19 08:22:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arne Fitzenreiter X-Patchwork-Id: 5187 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4K11l530xGz3wtR for ; Sat, 19 Feb 2022 08:22:25 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4K11l26jtZz207; Sat, 19 Feb 2022 08:22:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4K11l25VvRz2ygj; Sat, 19 Feb 2022 08:22:22 +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 "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4K11l216ZSz2xbM for ; Sat, 19 Feb 2022 08:22:22 +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) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4K11l105mtz1QK; Sat, 19 Feb 2022 08:22:20 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1645258941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Axkf/V3LPc/LxbwQjzkegNruZ8Xj2wAI3QzPxIlg71w=; b=8FLohygWmPC+nb0TpSVhqxlvO/ULVadXS6ntAjmJtO0BwM82WGnCUqibDHnvWdFRt7Al1X c4GIl2X+aW6YvZAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1645258941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Axkf/V3LPc/LxbwQjzkegNruZ8Xj2wAI3QzPxIlg71w=; b=tF9+Qv+EoCxpZw5RQz8MginCaDf/olzMZ3py3bWHRLFo3DT99Y6TwfTnu3JmwwIOxd+9AA f9Uo98s0ryxHcm5DfVRb5dG3h4elVrl70YBm0AVNb5UPywoTd1INzmJOOetgXaOWnVFfpc 29xVp01w2UFLkBUpnb+dgeAK7dgDShXtB/4dW/PBajwzlCqcRdlU+NcqFNRAbZEP6JtEVb 5Wmp1p2XWIVmVTsLiGhdAShtNFNExqHMln3ckDnye8SpNaGPSJVqiiw165lBJI/0MmahcR tKAzXMxhFnUeqJ46Y+l0FP3GVvCzZ6GxYW7T3ml9o05MdhyVPYrP6lxyAqovBQ== From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH] unbound: fix dns working check Date: Sat, 19 Feb 2022 09:22:06 +0100 Message-Id: <20220219082206.5807-1-arne_f@ipfire.org> MIME-Version: 1.0 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" pool.ipfire.org cannot resolved. Now try both default dns servers. If one works dns is working. Signed-off-by: Arne Fitzenreiter Reviewed-by: Peter Müller --- src/initscripts/system/unbound | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 1b42ac720..b959520a1 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -267,7 +267,8 @@ get_memory_amount() { fix_time_if_dns_fails() { # If DNS is working, everything is fine - if resolve "ipfire.pool.ntp.org" &>/dev/null; then + if resolve "0.ipfire.pool.ntp.org" &>/dev/null || \ + resolve "1.ipfire.pool.ntp.org" &>/dev/null ; then return 0 fi