]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
unbound: try resolve twice before time sync with ipfire server
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 3 Feb 2020 17:40:55 +0000 (17:40 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 3 Feb 2020 17:40:55 +0000 (17:40 +0000)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/system/unbound

index 78be8e2d50505ad4f2cd0d2ffb4b668155acad80..b6b57f1c1d12fc509e8b3fa5710ff40b0c89a021 100644 (file)
@@ -274,6 +274,8 @@ get_memory_amount() {
 }
 
 fix_time_if_dns_fails() {
+       # Sometimes the first try fails so do it twice
+       resolve "ping.ipfire.org" &>/dev/null
        # If DNS is working, everything is fine
        if resolve "ping.ipfire.org" &>/dev/null; then
                return 0