Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 454902 - net-misc/ntp: add systemd unit
Summary: net-misc/ntp: add systemd unit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit systemd-love
  Show dependency tree
 
Reported: 2013-01-31 20:42 UTC by Mario Kicherer
Modified: 2013-07-06 07:15 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ntp.service (ntp.service,101 bytes, text/plain)
2013-01-31 20:44 UTC, Mario Kicherer
Details
ntp-client.service (ntp-client.service,258 bytes, text/plain)
2013-01-31 20:46 UTC, Mario Kicherer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Kicherer 2013-01-31 20:42:58 UTC
Please ship a systemd service file with the package. It is required to start ntp with systemd and should not interfere on non-systemd systems.

Reproducible: Always
Comment 1 Mario Kicherer 2013-01-31 20:44:22 UTC
Created attachment 337502 [details]
ntp.service

Example for ntp.service, taken from http://en.gentoo-wiki.com/wiki/Systemd#ntpd
Comment 2 Mario Kicherer 2013-01-31 20:46:53 UTC
Created attachment 337504 [details]
ntp-client.service

(I don't know if it's appropriate but the same is required for net-misc/ntpclient that is currenty looking for a maintainer.)
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-31 20:52:46 UTC
There is timedatectl, although it doesn't seem to be able to sync on a certain interval unless you do it by cron but that doesn't feel like the right approach; so therefore, I would also love to see working ntp support.
Comment 4 Mario Kicherer 2013-01-31 20:55:39 UTC
(In reply to comment #2)
> Created attachment 337504 [details]
> ntp-client.service
> 
> (I don't know if it's appropriate but the same is required for
> net-misc/ntpclient that is currenty looking for a maintainer.)

Oh sorry, I got confused. This service file also belongs to the ntp package and should be called ntpdate.service.
Comment 5 Ooblick 2013-02-03 12:47:33 UTC
Is it worth having a "After=network.target" in the [Unit] section of these?
Comment 6 Mario Kicherer 2013-02-03 14:05:39 UTC
(In reply to comment #5)
> Is it worth having a "After=network.target" in the [Unit] section of these?

Hm, I didn't test but afaik ntp is also helpful if no network connection exists as it corrects a time drift itself.
Comment 7 Fabio Erculiani (RETIRED) gentoo-dev 2013-04-17 20:13:31 UTC
I committed a set of working units (ntp-client, ntpd and sntp [including sntp openrc init script]) into the systemd-love overlay at [1]. Tested and working.

[1] https://github.com/Sabayon/systemd-love/tree/master/net-misc/ntp
Comment 8 Pacho Ramos gentoo-dev 2013-07-05 16:59:38 UTC
(In reply to Fabio Erculiani from comment #7)
> I committed a set of working units (ntp-client, ntpd and sntp [including
> sntp openrc init script]) into the systemd-love overlay at [1]. Tested and
> working.
> 
> [1] https://github.com/Sabayon/systemd-love/tree/master/net-misc/ntp

I will commit in a week if nobody disagrees. Thanks
Comment 9 Pacho Ramos gentoo-dev 2013-07-06 07:15:18 UTC
+*ntp-4.2.6_p5-r3 (06 Jul 2013)
+
+  06 Jul 2013; Pacho Ramos <pacho@gentoo.org> +files/ntp-client.service,
+  +files/ntpd.service, +files/sntp.confd, +files/sntp.rc, +files/sntp.service,
+  +ntp-4.2.6_p5-r3.ebuild:
+  Install unit file (#454902).
+

(committed as base-system policy allow to commit unit files)