From patchwork Fri May 27 00:40:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jon X-Patchwork-Id: 5638 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 4L8QwL4l3qz3wcf for ; Fri, 27 May 2022 00:41:22 +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 4L8QwK0py3zjJ; Fri, 27 May 2022 00:41:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4L8QwJ6zHkz2yb8; Fri, 27 May 2022 00:41:20 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4L8QwJ29rzz2x9g for ; Fri, 27 May 2022 00:41:20 +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 4L8QwH1vS3zf2; Fri, 27 May 2022 00:41:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1653612079; 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=dsz+3wiYSN1bvrtVlzd/08erX0TRi9te0pIOqIVtC5s=; b=5WwNLCASPJgrc1yWNGrds24mkoC0dpEniHsmEKDw40YY42DcpvNtVQBCk8b4+JxMbTqOy1 YL1QzOUj1wHl06DA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1653612079; 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=dsz+3wiYSN1bvrtVlzd/08erX0TRi9te0pIOqIVtC5s=; b=m/g6WYUQg+BwPPpWdE1QtmOAwntUjuz50aVWjM2jMNXsknBH6e5xQQD94MzGzIClvyYnEu AdOIy8EIEYwZiAx8WeriJq3yLaWyvmFAGgtHxyHcz63B6paFx+aBXJwXyUnkeWZRGbYpDl n1Zg+2rU8BfRavKIj3zFNOUYcfuIhx8jqBltoQnHkiDVN0/nxmkb74cEulaIRChAVdW9Pb fZd0vBItdm3MlDzDvtyrpfFL+kCfilMKcQdfnpwFY3EsTM7BlxUNG8xKeGLD0oauqMazk4 sEVv0svd9BFwRpigr5h48gLNLQafZGfOAyIgKA+DMYDFBodqBDzs0E+acIM3dw== From: Jon Murphy To: development@lists.ipfire.org Subject: [PATCH] Ship NTP changes Date: Thu, 26 May 2022 19:40:31 -0500 Message-Id: <20220527004031.1737133-1-jon.murphy@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: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Device time more accurate. (e.g., +/- 10 seconds per day to < 100 ms on some devices) ( I know we don't need the perfect time server ) - NTP and time will be accurate in manual mode (setting on Time Server > NTP Configuration WebGUI) - Change NTP "prefer" server: - The current preferred NTP server in an Undisciplined Local Clock. - This is intended when no outside source of synchronized time is available. - Change the "prefer" server from 127.127.1.0 to the Primary NTP server specified on the Time Server > NTP Configuration WebGUI page. - Change allows the drift file (located at /etc/ntp/drift) to be populated by ntpd. - The drift file is updated about once per hour which helps correct the device time. Signed-off-by: Jon Murphy --- config/ntp/ntp.conf | 3 ++- src/initscripts/system/ntp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/ntp/ntp.conf b/config/ntp/ntp.conf index 9e393ca8e..bcaf2ee9e 100644 --- a/config/ntp/ntp.conf +++ b/config/ntp/ntp.conf @@ -1,6 +1,7 @@ disable monitor restrict default nomodify noquery restrict 127.0.0.1 -server 127.127.1.0 prefer +server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /etc/ntp/drift +includefile /etc/ntp/ntpInclude.conf diff --git a/src/initscripts/system/ntp b/src/initscripts/system/ntp index 74b8bc86a..6c8174d25 100644 --- a/src/initscripts/system/ntp +++ b/src/initscripts/system/ntp @@ -52,6 +52,8 @@ case "$1" in fi fi + echo -e "server ${NTP_ADDR_1} prefer\nserver ${NTP_ADDR_2}" > /etc/ntp/ntpInclude.conf + boot_mesg "Starting ntpd..." loadproc /usr/bin/ntpd -Ap /var/run/ntpd.pid ;;