From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.pqgruber.com ([52.59.78.55]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1in0cJ-0002rq-Ea for ptxdist@pengutronix.de; Thu, 02 Jan 2020 14:34:24 +0100 From: Clemens Gruber Date: Thu, 2 Jan 2020 14:34:20 +0100 Message-Id: <20200102133420.54890-1-clemens.gruber@pqgruber.com> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2] systemd: install systemd-timesync.list in ntp-units.d List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Clemens Gruber When systemd-timesyncd is used, there should be an entry in ntp-units.d. Otherwise, timedatectl set-ntp sometimes fails with "NTP not supported". Signed-off-by: Clemens Gruber --- Changes from v1: - Changed install_tree to install_alternative to support overriding and to let other packages install ntp-units.d files as well .../usr/lib/systemd/ntp-units.d/80-systemd-timesync.list | 1 + rules/systemd.make | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list diff --git a/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list new file mode 100644 index 000000000..d5959ade8 --- /dev/null +++ b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list @@ -0,0 +1 @@ +systemd-timesyncd.service diff --git a/rules/systemd.make b/rules/systemd.make index 5564d893f..2ecb3b648 100644 --- a/rules/systemd.make +++ b/rules/systemd.make @@ -432,6 +432,8 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE /var/lib/systemd/timesync) @$(call install_link, systemd, ../systemd-timesyncd.service, \ /usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service) + @$(call install_alternative, systemd, 0, 0, 0664, \ + /usr/lib/systemd/ntp-units.d/80-systemd-timesync.list) endif ifdef PTXCONF_SYSTEMD_VCONSOLE -- 2.24.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de