summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-09-15 18:51:48 +0000
committerPacho Ramos <pacho@gentoo.org>2013-09-15 18:51:48 +0000
commitb0e996301ddb006cb582f7b313ef1e959fdeb13c (patch)
tree2540db94c935dd9e5b18639ec06be1821915cca7 /net-misc/ntp
parentMasked JCE functionality of dev-java/diablo-jdk. (diff)
downloadgentoo-2-b0e996301ddb006cb582f7b313ef1e959fdeb13c.tar.gz
gentoo-2-b0e996301ddb006cb582f7b313ef1e959fdeb13c.tar.bz2
gentoo-2-b0e996301ddb006cb582f7b313ef1e959fdeb13c.zip
Fix unit files to not use forking and stop relying in /etc/conf.d files
(Portage version: 2.2.4/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'net-misc/ntp')
-rw-r--r--net-misc/ntp/ChangeLog10
-rw-r--r--net-misc/ntp/files/ntpd.service-r1 (renamed from net-misc/ntp/files/ntpd.service)4
-rw-r--r--net-misc/ntp/files/ntpdate.service (renamed from net-misc/ntp/files/ntp-client.service)5
-rw-r--r--net-misc/ntp/files/ntpdate.service.conf2
-rw-r--r--net-misc/ntp/files/sntp.service-r113
-rw-r--r--net-misc/ntp/files/sntp.service.conf2
-rw-r--r--net-misc/ntp/ntp-4.2.6_p5-r5.ebuild (renamed from net-misc/ntp/ntp-4.2.6_p5-r4.ebuild)9
7 files changed, 35 insertions, 10 deletions
diff --git a/net-misc/ntp/ChangeLog b/net-misc/ntp/ChangeLog
index d4ae03f9b560..68501e6a5884 100644
--- a/net-misc/ntp/ChangeLog
+++ b/net-misc/ntp/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/ntp
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.190 2013/09/11 01:53:37 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.191 2013/09/15 18:51:48 pacho Exp $
+
+*ntp-4.2.6_p5-r5 (15 Sep 2013)
+
+ 15 Sep 2013; Pacho Ramos <pacho@gentoo.org> +files/ntpd.service-r1,
+ +files/ntpdate.service, +files/ntpdate.service.conf, +files/sntp.service-r1,
+ +files/sntp.service.conf, +ntp-4.2.6_p5-r5.ebuild, -files/ntp-client.service,
+ -files/ntpd.service, -ntp-4.2.6_p5-r4.ebuild:
+ Fix unit files to not use forking and stop relying in /etc/conf.d files
*ntp-4.2.6_p5-r4 (11 Sep 2013)
diff --git a/net-misc/ntp/files/ntpd.service b/net-misc/ntp/files/ntpd.service-r1
index d80c6b08c9ca..b58cdefcc22a 100644
--- a/net-misc/ntp/files/ntpd.service
+++ b/net-misc/ntp/files/ntpd.service-r1
@@ -3,9 +3,7 @@ Description=Network Time Service
After=ntp-client.service sntp.service
[Service]
-Type=forking
-EnvironmentFile=/etc/conf.d/ntpd
-ExecStart=/usr/sbin/ntpd $NTPD_OPTS
+ExecStart=/usr/sbin/ntpd -n
PrivateTmp=true
[Install]
diff --git a/net-misc/ntp/files/ntp-client.service b/net-misc/ntp/files/ntpdate.service
index 5d09eb4d0df9..e223839201f4 100644
--- a/net-misc/ntp/files/ntp-client.service
+++ b/net-misc/ntp/files/ntpdate.service
@@ -1,13 +1,12 @@
[Unit]
-Description=Set time via NTP
+Description=Set time via NTP using ntpdate
After=network.target nss-lookup.target
Before=time-sync.target
Wants=time-sync.target
[Service]
Type=oneshot
-EnvironmentFile=/etc/conf.d/ntp-client
-ExecStart=/usr/sbin/ntpdate $NTPCLIENT_OPTS
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
RemainAfterExit=yes
[Install]
diff --git a/net-misc/ntp/files/ntpdate.service.conf b/net-misc/ntp/files/ntpdate.service.conf
new file mode 100644
index 000000000000..75e4f41b4162
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/files/sntp.service-r1 b/net-misc/ntp/files/sntp.service-r1
new file mode 100644
index 000000000000..2686951f641d
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target NetworkManager-wait-online.service nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/sntp.service.conf b/net-misc/ntp/files/sntp.service.conf
new file mode 100644
index 000000000000..75e4f41b4162
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/ntp-4.2.6_p5-r4.ebuild b/net-misc/ntp/ntp-4.2.6_p5-r5.ebuild
index 8a2a0f745757..1f7af4581853 100644
--- a/net-misc/ntp/ntp-4.2.6_p5-r4.ebuild
+++ b/net-misc/ntp/ntp-4.2.6_p5-r5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.6_p5-r4.ebuild,v 1.1 2013/09/11 01:53:37 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.6_p5-r5.ebuild,v 1.1 2013/09/15 18:51:48 pacho Exp $
EAPI="4"
@@ -106,10 +106,13 @@ src_install() {
rm etc/{conf,init}.d/ntpd
rm usr/share/man/*/ntpd.8 || die
else
- systemd_dounit "${FILESDIR}"/ntpd.service
+ systemd_newunit "${FILESDIR}"/ntpd.service-r1 ntpd.service
fi
- systemd_dounit "${FILESDIR}"/{ntp-client,sntp}.service
+ systemd_dounit "${FILESDIR}"/ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_dounit "${FILESDIR}"/sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
}
pkg_postinst() {