mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/2] chrony: unify location of config files
Date: Mon,  5 Jul 2021 09:49:24 +0200	[thread overview]
Message-ID: <20210705074925.26542-1-u.kleine-koenig@pengutronix.de> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 2143 bytes --]

The upstream default location of the config file is directly in /etc
instead of /etc/chrony/ and also the systemd unit uses /etc. So switch
the init script and ptxdist rules accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 projectroot/etc/init.d/chrony | 4 ++--
 rules/chrony.make             | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/projectroot/etc/init.d/chrony b/projectroot/etc/init.d/chrony
index d112927f825e..1602eec6dcb9 100644
--- a/projectroot/etc/init.d/chrony
+++ b/projectroot/etc/init.d/chrony
@@ -9,14 +9,14 @@
 
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
 BINARY="/usr/sbin/chronyd"
-CONFIG="/etc/chrony/chrony.conf"
+CONFIG="/etc/chrony.conf"
 PREFIX="chrony: "
 # This system doesn´t have full rtc ioctl support for
 # chrony statistic functions
 RTC_IOCTL="incomplete"
 
 # some chronyc commands need prior autentication: extract keys from config
-KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' /etc/chrony/chrony.conf)
+KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' "$CONFIG")
 PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys`
 
 # convenience functions
diff --git a/rules/chrony.make b/rules/chrony.make
index cbdf9314b52b..bdceb454c175 100644
--- a/rules/chrony.make
+++ b/rules/chrony.make
@@ -100,14 +100,14 @@ endif
 
 # generic one
 ifdef PTXCONF_CHRONY_INSTALL_CONFIG
-	@$(call install_alternative, chrony, 0, 0, 0644, /etc/chrony/chrony.conf)
-	@$(call install_alternative, chrony, 0, 0, 0600, /etc/chrony/chrony.keys)
+	@$(call install_alternative, chrony, 0, 0, 0644, /etc/chrony.conf)
+	@$(call install_alternative, chrony, 0, 0, 0600, /etc/chrony.keys)
 
 # modify placeholders with data from configuration
-	@$(call install_replace, chrony, /etc/chrony/chrony.conf, \
+	@$(call install_replace, chrony, /etc/chrony.conf, \
 		@UNCONFIGURED_CHRONY_SERVER_IP@, $(PTXCONF_CHRONY_DEFAULT_NTP_SERVER))
 
-	@$(call install_replace, chrony, /etc/chrony/chrony.keys, \
+	@$(call install_replace, chrony, /etc/chrony.keys, \
 		@UNCONFIGURED_CHRONY_ACCESS_KEY@, $(PTXCONF_CHRONY_DEFAULT_ACCESS_KEY))
 endif
 
-- 
2.30.2



[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

             reply	other threads:[~2021-07-05  7:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  7:49 Uwe Kleine-König [this message]
2021-07-05  7:49 ` [ptxdist] [PATCH 2/2] chrony: version bump 3.5 -> 4.1 Uwe Kleine-König
2021-07-07 14:31   ` Michael Olbrich
2021-07-07 14:52     ` Bruno Thomsen
2021-07-07 16:42       ` Uwe Kleine-König
2021-11-05 20:17         ` Christian Melki
2021-11-12  9:11           ` Michael Olbrich
2021-11-12  9:53             ` Christian Melki
2021-07-07 14:15 ` [ptxdist] [PATCH 1/2] chrony: unify location of config files Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210705074925.26542-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox