From f56b1f868382bd6c4a2774e39bb4d9004c79c953 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 27 Apr 2012 15:15:02 +0200 Subject: [PATCH] update service file for systemd-timedated-ntp target (#816493) --- chrony.spec | 7 ++++++- chronyd.service | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/chrony.spec b/chrony.spec index 75dd8fa..089a317 100644 --- a/chrony.spec +++ b/chrony.spec @@ -66,7 +66,8 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/chrony mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d mkdir -p $RPM_BUILD_ROOT%{_libexecdir} -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/systemd-timedated-ntp.target.wants + install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf install -m 640 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.keys @@ -82,6 +83,9 @@ install -m 644 -p %{SOURCE9} \ touch $RPM_BUILD_ROOT%{_localstatedir}/lib/chrony/{drift,rtc} +ln -sf ../chronyd.service \ + $RPM_BUILD_ROOT/lib/systemd/system/systemd-timedated-ntp.target.wants + %clean rm -rf $RPM_BUILD_ROOT @@ -132,6 +136,7 @@ fi %{_libexecdir}/chrony-helper %{_infodir}/chrony.info* /lib/systemd/system/chrony*.service +/lib/systemd/system/systemd-timedated-ntp.target.wants %{_mandir}/man[158]/%{name}*.[158]* %dir %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony %ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/drift diff --git a/chronyd.service b/chronyd.service index a96e604..167332e 100644 --- a/chronyd.service +++ b/chronyd.service @@ -2,6 +2,7 @@ Description=NTP client/server After=syslog.target ntpdate.service Conflicts=ntpd.service +BindTo=systemd-timedated-ntp.target [Service] Type=forking