summaryrefslogtreecommitdiff
path: root/net-misc/chrony/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /net-misc/chrony/files
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'net-misc/chrony/files')
-rw-r--r--net-misc/chrony/files/chrony-3.4-systemd-gentoo.patch28
-rw-r--r--net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch12
-rw-r--r--net-misc/chrony/files/chronyd.conf2
-rw-r--r--net-misc/chrony/files/chronyd.init-r169
-rw-r--r--net-misc/chrony/files/chronyd.service-r212
5 files changed, 13 insertions, 110 deletions
diff --git a/net-misc/chrony/files/chrony-3.4-systemd-gentoo.patch b/net-misc/chrony/files/chrony-3.4-systemd-gentoo.patch
deleted file mode 100644
index 63d6b7ed3398..000000000000
--- a/net-misc/chrony/files/chrony-3.4-systemd-gentoo.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ba3ddefc90f58d30a365104cf6e930333e3a2704 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Tue, 4 Sep 2018 13:01:06 -0400
-Subject: [PATCH] Tweak chronyd.service for Gentoo
-
----
- examples/chronyd.service | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/examples/chronyd.service b/examples/chronyd.service
-index 1777413..ceed830 100644
---- a/examples/chronyd.service
-+++ b/examples/chronyd.service
-@@ -7,9 +7,8 @@ ConditionCapability=CAP_SYS_TIME
-
- [Service]
- Type=forking
--PIDFile=/var/run/chrony/chronyd.pid
--EnvironmentFile=-/etc/sysconfig/chronyd
--ExecStart=/usr/sbin/chronyd $OPTIONS
-+PIDFile=/run/chrony/chronyd.pid
-+ExecStart=/usr/sbin/chronyd
- PrivateTmp=yes
- ProtectHome=yes
- ProtectSystem=full
---
-2.18.0
-
diff --git a/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch b/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch
new file mode 100644
index 000000000000..0ea3c921980b
--- /dev/null
+++ b/net-misc/chrony/files/chrony-3.5-r3-systemd-gentoo.patch
@@ -0,0 +1,12 @@
+--- a/examples/chronyd.service
++++ b/examples/chronyd.service
+@@ -8,8 +8,7 @@
+ [Service]
+ Type=forking
+ PIDFile=/run/chrony/chronyd.pid
+-EnvironmentFile=-/etc/sysconfig/chronyd
+-ExecStart=/usr/sbin/chronyd $OPTIONS
++ExecStart=/usr/sbin/chronyd -u ntp -F 1
+ PrivateTmp=yes
+ ProtectHome=yes
+ ProtectSystem=full
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
index fc43a95c40fe..c04f3525f0b7 100644
--- a/net-misc/chrony/files/chronyd.conf
+++ b/net-misc/chrony/files/chronyd.conf
@@ -9,4 +9,4 @@ CFGFILE="/etc/chrony/chrony.conf"
# The combination of "-s -r" allows chronyd to perform long term averaging of
# the gain or loss rate across system reboots and shutdowns.
-ARGS=""
+ARGS="-u ntp -F 1"
diff --git a/net-misc/chrony/files/chronyd.init-r1 b/net-misc/chrony/files/chronyd.init-r1
deleted file mode 100644
index a76e2533f57d..000000000000
--- a/net-misc/chrony/files/chronyd.init-r1
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- use dns
-}
-
-checkconfig() {
- # Note that /etc/chrony/chrony.keys is *NOT* checked. This
- # is because the user may have specified another key
- # file, and we don't want to force the user to use that
- # exact name for the key file.
- if [ ! -f "${CFGFILE}" ] ; then
- eerror "Please create ${CFGFILE} and the"
- eerror "chrony key file (usually /etc/chrony/chrony.keys)"
- eerror "by using the"
- eerror ""
- eerror " chrony.conf.example"
- eerror " chrony.keys.example"
- eerror ""
- eerror "files (from the documentation directory)"
- eerror "as templates."
- return 1
- else
- # Actually, I tried it, and chrony seems to ignore the pidfile
- # option. I'm going to leave it here anyway, since you never
- # know if it might be handy
- PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
- fi
- return 0
-}
-
-setxtrarg() {
- if [ -c /dev/rtc ]; then
- grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
- fi
- grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
- return 0
-}
-
-start() {
- checkconfig || return $?
- setxtrarg
-
- [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
-
- ebegin "Starting chronyd"
- start-stop-daemon \
- --start \
- --quiet \
- --exec /usr/sbin/chronyd \
- --pidfile "${PIDFILE}" \
- -- -f "${CFGFILE}" ${ARGS}
- eend $? "Failed to start chronyd"
-}
-
-stop() {
- checkconfig || return $?
-
- [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
-
- ebegin "Stopping chronyd"
- start-stop-daemon \
- --stop \
- --quiet \
- --pidfile "${PIDFILE}"
- eend $? "Failed to stop chronyd"
-}
diff --git a/net-misc/chrony/files/chronyd.service-r2 b/net-misc/chrony/files/chronyd.service-r2
deleted file mode 100644
index 90255675c838..000000000000
--- a/net-misc/chrony/files/chronyd.service-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Chrony Network Time Service
-After=ntpdate.service sntp.service network.target
-Conflicts=ntpd.service systemd-timesyncd.service
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/chronyd
-PIDFile=/run/chronyd.pid
-
-[Install]
-WantedBy=multi-user.target