From 5ed6e33a520416312c11e0ecd5e2136d5a3e7f03 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 8 Aug 2018 15:18:04 +0200 Subject: [PATCH] committing changes in /etc after apt run Package changes: +chrony 3.2-4ubuntu4.1 amd64 --- .etckeeper | 14 ++++ NetworkManager/dispatcher.d/20-chrony | 41 +++++++++++ apparmor.d/local/usr.sbin.chronyd | 0 apparmor.d/usr.sbin.chronyd | 61 ++++++++++++++++ .../network-interface-security/usr.sbin.ntpd | 1 - chrony/chrony.conf | 45 ++++++++++++ chrony/chrony.keys | 10 +++ default/chrony | 10 +++ dhcp/dhclient-exit-hooks.d/chrony | 25 +++++++ group | 1 + group- | 2 +- gshadow | 1 + gshadow- | 2 +- init.d/chrony | 73 +++++++++++++++++++ logrotate.d/chrony | 8 ++ network/if-post-down.d/chrony | 11 +++ network/if-up.d/chrony | 12 +++ passwd | 1 + passwd- | 2 + ppp/ip-down.d/chrony | 13 ++++ ppp/ip-up.d/chrony | 12 +++ rc0.d/K01chrony | 1 + rc1.d/K01chrony | 1 + rc2.d/S01chrony | 1 + rc3.d/S01chrony | 1 + rc4.d/S01chrony | 1 + rc5.d/S01chrony | 1 + rc6.d/K01chrony | 1 + shadow | 1 + shadow- | 4 +- systemd/system/chronyd.service | 1 + .../multi-user.target.wants/chrony.service | 1 + systemd/system/ntp-systemd-netif.path | 1 + systemd/system/ntp.service | 1 + 34 files changed, 357 insertions(+), 4 deletions(-) create mode 100755 NetworkManager/dispatcher.d/20-chrony create mode 100644 apparmor.d/local/usr.sbin.chronyd create mode 100644 apparmor.d/usr.sbin.chronyd delete mode 120000 apparmor/init/network-interface-security/usr.sbin.ntpd create mode 100644 chrony/chrony.conf create mode 100644 chrony/chrony.keys create mode 100644 default/chrony create mode 100644 dhcp/dhclient-exit-hooks.d/chrony create mode 100755 init.d/chrony create mode 100644 logrotate.d/chrony create mode 100755 network/if-post-down.d/chrony create mode 100755 network/if-up.d/chrony create mode 100755 ppp/ip-down.d/chrony create mode 100755 ppp/ip-up.d/chrony create mode 120000 rc0.d/K01chrony create mode 120000 rc1.d/K01chrony create mode 120000 rc2.d/S01chrony create mode 120000 rc3.d/S01chrony create mode 120000 rc4.d/S01chrony create mode 120000 rc5.d/S01chrony create mode 120000 rc6.d/K01chrony create mode 120000 systemd/system/chronyd.service create mode 120000 systemd/system/multi-user.target.wants/chrony.service create mode 120000 systemd/system/ntp-systemd-netif.path create mode 120000 systemd/system/ntp.service diff --git a/.etckeeper b/.etckeeper index affebbd..1f58400 100755 --- a/.etckeeper +++ b/.etckeeper @@ -92,6 +92,7 @@ maybe chmod 0755 'NetworkManager/conf.d' maybe chmod 0644 'NetworkManager/conf.d/default-wifi-powersave-on.conf' maybe chmod 0755 'NetworkManager/dispatcher.d' maybe chmod 0755 'NetworkManager/dispatcher.d/01-ifupdown' +maybe chmod 0755 'NetworkManager/dispatcher.d/20-chrony' maybe chmod 0755 'NetworkManager/dispatcher.d/no-wait.d' maybe chmod 0755 'NetworkManager/dispatcher.d/ntp' maybe chmod 0755 'NetworkManager/dispatcher.d/pre-down.d' @@ -369,6 +370,7 @@ maybe chmod 0644 'apparmor.d/local/usr.lib.libreoffice.program.soffice.bin' maybe chmod 0644 'apparmor.d/local/usr.lib.libreoffice.program.xpdfimport' maybe chmod 0644 'apparmor.d/local/usr.lib.libvirt.virt-aa-helper' maybe chmod 0644 'apparmor.d/local/usr.sbin.avahi-daemon' +maybe chmod 0644 'apparmor.d/local/usr.sbin.chronyd' maybe chmod 0644 'apparmor.d/local/usr.sbin.cups-browsed' maybe chmod 0644 'apparmor.d/local/usr.sbin.cupsd' maybe chmod 0644 'apparmor.d/local/usr.sbin.dnsmasq' @@ -435,6 +437,7 @@ maybe chmod 0644 'apparmor.d/usr.lib.libreoffice.program.soffice.bin' maybe chmod 0644 'apparmor.d/usr.lib.libreoffice.program.xpdfimport' maybe chmod 0644 'apparmor.d/usr.lib.libvirt.virt-aa-helper' maybe chmod 0644 'apparmor.d/usr.sbin.avahi-daemon' +maybe chmod 0644 'apparmor.d/usr.sbin.chronyd' maybe chmod 0644 'apparmor.d/usr.sbin.cups-browsed' maybe chmod 0644 'apparmor.d/usr.sbin.cupsd' maybe chmod 0644 'apparmor.d/usr.sbin.dnsmasq' @@ -999,6 +1002,9 @@ maybe chmod 0644 'chatscripts/gprs' maybe chmod 0644 'chatscripts/pap' maybe chgrp 'dip' 'chatscripts/provider' maybe chmod 0640 'chatscripts/provider' +maybe chmod 0755 'chrony' +maybe chmod 0644 'chrony/chrony.conf' +maybe chmod 0640 'chrony/chrony.keys' maybe chmod 0755 'cifs-utils' maybe chmod 0644 'colordiffrc' maybe chmod 0755 'compizconfig' @@ -1215,6 +1221,7 @@ maybe chmod 0644 'default/bind9' maybe chmod 0644 'default/bridge-utils' maybe chmod 0644 'default/bsdmainutils' maybe chmod 0600 'default/cacerts' +maybe chmod 0644 'default/chrony' maybe chmod 0644 'default/console-setup' maybe chmod 0644 'default/crda' maybe chmod 0644 'default/cron' @@ -1270,6 +1277,7 @@ maybe chmod 0755 'dhcp/dhclient-enter-hooks.d/avahi-autoipd' maybe chmod 0755 'dhcp/dhclient-enter-hooks.d/resolved' maybe chmod 0755 'dhcp/dhclient-enter-hooks.d/samba' maybe chmod 0755 'dhcp/dhclient-exit-hooks.d' +maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/chrony' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntp' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntpdate' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes' @@ -1837,6 +1845,7 @@ maybe chmod 0755 'init.d/atd' maybe chmod 0755 'init.d/avahi-daemon' maybe chmod 0755 'init.d/bind9' maybe chmod 0755 'init.d/bluetooth' +maybe chmod 0755 'init.d/chrony' maybe chmod 0755 'init.d/console-setup.sh' maybe chmod 0755 'init.d/cron' maybe chmod 0755 'init.d/cryptdisks' @@ -2127,6 +2136,7 @@ maybe chmod 0644 'logrotate.d/apport' maybe chmod 0644 'logrotate.d/apt' maybe chmod 0644 'logrotate.d/aptitude' maybe chmod 0644 'logrotate.d/bind' +maybe chmod 0644 'logrotate.d/chrony' maybe chmod 0644 'logrotate.d/ctdb' maybe chmod 0644 'logrotate.d/cups-daemon' maybe chmod 0644 'logrotate.d/dpkg' @@ -2260,6 +2270,7 @@ maybe chmod 0755 'network/if-down.d/bind9' maybe chmod 0755 'network/if-down.d/openvpn' maybe chmod 0755 'network/if-down.d/postfix' maybe chmod 0755 'network/if-post-down.d' +maybe chmod 0755 'network/if-post-down.d/chrony' maybe chmod 0755 'network/if-post-down.d/vde2' maybe chmod 0755 'network/if-post-down.d/wireless-tools' maybe chmod 0755 'network/if-pre-up.d' @@ -2270,6 +2281,7 @@ maybe chmod 0755 'network/if-up.d' maybe chmod 0755 'network/if-up.d/avahi-autoipd' maybe chmod 0755 'network/if-up.d/avahi-daemon' maybe chmod 0755 'network/if-up.d/bind9' +maybe chmod 0755 'network/if-up.d/chrony' maybe chmod 0755 'network/if-up.d/ethtool' maybe chmod 0755 'network/if-up.d/ntpdate' maybe chmod 0755 'network/if-up.d/openssh-server' @@ -2397,12 +2409,14 @@ maybe chmod 0755 'ppp/ip-down.d' maybe chmod 0755 'ppp/ip-down.d/0000usepeerdns' maybe chmod 0755 'ppp/ip-down.d/0dns-down' maybe chmod 0755 'ppp/ip-down.d/bind9' +maybe chmod 0755 'ppp/ip-down.d/chrony' maybe chmod 0755 'ppp/ip-down.d/postfix' maybe chmod 0755 'ppp/ip-up' maybe chmod 0755 'ppp/ip-up.d' maybe chmod 0755 'ppp/ip-up.d/0000usepeerdns' maybe chmod 0755 'ppp/ip-up.d/0dns-up' maybe chmod 0755 'ppp/ip-up.d/bind9' +maybe chmod 0755 'ppp/ip-up.d/chrony' maybe chmod 0755 'ppp/ip-up.d/postfix' maybe chmod 0755 'ppp/ipv6-down' maybe chmod 0755 'ppp/ipv6-down.d' diff --git a/NetworkManager/dispatcher.d/20-chrony b/NetworkManager/dispatcher.d/20-chrony new file mode 100755 index 0000000..8bd7df0 --- /dev/null +++ b/NetworkManager/dispatcher.d/20-chrony @@ -0,0 +1,41 @@ +#!/bin/sh +# This is a NetworkManager dispatcher / networkd-dispatcher script for +# chronyd to set its NTP sources online or offline when a network interface +# is configured or removed + +export LC_ALL=C + +# For NetworkManager consider only up/down events +[ $# -ge 2 ] && [ "$2" != "up" ] && [ "$2" != "down" ] && exit 0 + +# Note: for networkd-dispatcher routable.d ~= on and off.d ~= off + +# Check if there is a default route + +if /sbin/ip route list 2> /dev/null | grep -q '^default'; then + chronyc online > /dev/null 2>&1 + exit 0 +fi + +sources=$(chronyc -c -n sources 2> /dev/null) + +[ $? -ne 0 ] && exit 0 + +# Check each configured source if it has a route + +echo "$sources" | while IFS=, read mode state address rest; do + [ "$mode" != '^' ] && [ "$mode" != '=' ] && continue + + /sbin/ip route get "$address" > /dev/null 2>&1 && command="online" || command="offline" + + # Set priority of sources so that the selected source is set as + # last if offline to avoid unnecessary reselection + [ "$state" != '*' ] && priority=1 || priority=2 + + echo "$priority $command $address" + +done | sort | while read priority command address; do + echo "$command $address" +done | chronyc > /dev/null 2>&1 + +exit 0 diff --git a/apparmor.d/local/usr.sbin.chronyd b/apparmor.d/local/usr.sbin.chronyd new file mode 100644 index 0000000..e69de29 diff --git a/apparmor.d/usr.sbin.chronyd b/apparmor.d/usr.sbin.chronyd new file mode 100644 index 0000000..4424e3c --- /dev/null +++ b/apparmor.d/usr.sbin.chronyd @@ -0,0 +1,61 @@ +# Last Modified: Sat Jan 20 10:45:05 2018 +#include +#include + +/usr/sbin/chronyd (attach_disconnected) { + #include + #include + + capability sys_time, + capability net_bind_service, + capability setuid, + capability setgid, + capability sys_nice, + capability sys_resource, + # for /run/chrony to be created + capability chown, + # for hwtimestamp + capability net_admin, + + /usr/sbin/chronyd mr, + + /etc/chrony/{,**} r, + /{,var/}run/chronyd.pid w, + /{,var/}run/chrony/{,*} rw, + /var/lib/chrony/{,*} r, + /var/lib/chrony/* w, + /var/log/chrony/{,*} r, + /var/log/chrony/* w, + + # Using the “tempcomp” directive gives chronyd the ability to improve + # the stability and accuracy of the clock by compensating the temperature + # changes measured by a sensor close to the oscillator. + @{sys}/class/hwmon/hwmon[0-9]*/temp[0-9]*_input r, + + # Support all paths suggested in the man page (LP: #1771028). Assume these + # are common use cases; others should be set as local include (see below). + # Configs using a 'chrony.' prefix like the tempcomp config file example + /etc/chrony.* r, + # Example gpsd socket is outside /{,var/}run/chrony/ + /{,var/}run/chrony.tty{,*}.sock rw, + # To sign replies to MS-SNTP clients by the smbd daemon + /var/lib/samba/ntp_signd r, + /var/lib/samba/ntp_signd/{,*} rw, + + # rtc + /etc/adjtime r, + /dev/rtc{,[0-9]*} rw, + + # gps devices + /dev/pps[0-9]* rw, + /dev/ptp[0-9]* rw, + + # For use with clocks that report via shared memory (e.g. gpsd), + # you may need to give ntpd access to all of shared memory, though + # this can be considered dangerous. See https://launchpad.net/bugs/722815 + # for details. To enable, add this to local/usr.sbin.chronyd: + # capability ipc_owner, + + # Site-specific additions and overrides. See local/README for details. + #include +} diff --git a/apparmor/init/network-interface-security/usr.sbin.ntpd b/apparmor/init/network-interface-security/usr.sbin.ntpd deleted file mode 120000 index dbd958f..0000000 --- a/apparmor/init/network-interface-security/usr.sbin.ntpd +++ /dev/null @@ -1 +0,0 @@ -../../../apparmor.d/usr.sbin.ntpd \ No newline at end of file diff --git a/chrony/chrony.conf b/chrony/chrony.conf new file mode 100644 index 0000000..d5a0b37 --- /dev/null +++ b/chrony/chrony.conf @@ -0,0 +1,45 @@ +# Welcome to the chrony configuration file. See chrony.conf(5) for more +# information about usuable directives. + +# This will use (up to): +# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled +# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well +# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm) +# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only +# sources will be used. +# At the same time it retains some protection against one of the entries being +# down (compare to just using one of the lines). See (LP: #1754358) for the +# discussion. +# +# About using servers from the NTP Pool Project in general see (LP: #104525). +# Approved by Ubuntu Technical Board on 2011-02-08. +# See http://www.pool.ntp.org/join.html for more information. +pool ntp.ubuntu.com iburst maxsources 4 +pool 0.ubuntu.pool.ntp.org iburst maxsources 1 +pool 1.ubuntu.pool.ntp.org iburst maxsources 1 +pool 2.ubuntu.pool.ntp.org iburst maxsources 2 + +# This directive specify the location of the file containing ID/key pairs for +# NTP authentication. +keyfile /etc/chrony/chrony.keys + +# This directive specify the file into which chronyd will store the rate +# information. +driftfile /var/lib/chrony/chrony.drift + +# Uncomment the following line to turn logging on. +#log tracking measurements statistics + +# Log files location. +logdir /var/log/chrony + +# Stop bad estimates upsetting machine clock. +maxupdateskew 100.0 + +# This directive enables kernel synchronisation (every 11 minutes) of the +# real-time clock. Note that it can’t be used along with the 'rtcfile' directive. +rtcsync + +# Step the system clock instead of slewing it if the adjustment is larger than +# one second, but only in the first three clock updates. +makestep 1 3 diff --git a/chrony/chrony.keys b/chrony/chrony.keys new file mode 100644 index 0000000..cee70b3 --- /dev/null +++ b/chrony/chrony.keys @@ -0,0 +1,10 @@ +# This file is solely used for NTP authentication with symmetric keys +# as defined by RFC 1305 and RFC 5905. +# +# It can contain ID/key pairs which can be generated using the “keygen” option +# from “chronyc”; for example: +# chronyc keygen 1 SHA256 256 >> /etc/chrony/chrony.keys +# would generate a 256-bit SHA-256 key using ID 1. +# +# A list of supported hash functions and output encoding can be found in +# the "keyfile" section from the "/usr/share/doc/chrony/chrony.txt.gz" file. diff --git a/default/chrony b/default/chrony new file mode 100644 index 0000000..b523f60 --- /dev/null +++ b/default/chrony @@ -0,0 +1,10 @@ +# This is a configuration file for /etc/init.d/chrony and +# /lib/systemd/system/chrony.service; it allows you to pass various options to +# the chrony daemon without editing the init script or service file. + +# Options to pass to chrony. +DAEMON_OPTS="" + +# Sync systecm clock in containers or without CAP_SYS_TIME (likely to fail) +# See /usr/share/doc/chrony/README.container for details. +SYNC_IN_CONTAINER="no" diff --git a/dhcp/dhclient-exit-hooks.d/chrony b/dhcp/dhclient-exit-hooks.d/chrony new file mode 100644 index 0000000..690f3ab --- /dev/null +++ b/dhcp/dhclient-exit-hooks.d/chrony @@ -0,0 +1,25 @@ +SERVERFILE=/var/lib/dhcp/chrony.servers.$interface + +chrony_config() { + rm -f $SERVERFILE + for server in $new_ntp_servers; do + echo "$server iburst" >> $SERVERFILE + done + /usr/lib/chrony/chrony-helper update-daemon || : +} + +chrony_restore() { + if [ -f $SERVERFILE ]; then + rm -f $SERVERFILE + /usr/lib/chrony/chrony-helper update-daemon || : + fi +} + +case $reason in + BOUND|RENEW|REBIND|REBOOT) + chrony_config + ;; + EXPIRE|FAIL|RELEASE|STOP) + chrony_restore + ;; +esac diff --git a/group b/group index fe12092..908def0 100644 --- a/group +++ b/group @@ -83,3 +83,4 @@ winbindd_priv:x:141: nobody:x:1001: sambamachines:x:1002: plex:x:963:frank +_chrony:x:142: diff --git a/group- b/group- index 143ab10..fe12092 100644 --- a/group- +++ b/group- @@ -82,4 +82,4 @@ mysql:x:140: winbindd_priv:x:141: nobody:x:1001: sambamachines:x:1002: -plex:x:963: +plex:x:963:frank diff --git a/gshadow b/gshadow index cc9ca9a..1859a6a 100644 --- a/gshadow +++ b/gshadow @@ -83,3 +83,4 @@ winbindd_priv:!:: nobody:!:: sambamachines:!:: plex:!::frank +_chrony:!:: diff --git a/gshadow- b/gshadow- index 40712bd..cc9ca9a 100644 --- a/gshadow- +++ b/gshadow- @@ -82,4 +82,4 @@ mysql:!:: winbindd_priv:!:: nobody:!:: sambamachines:!:: -plex:!:: +plex:!::frank diff --git a/init.d/chrony b/init.d/chrony new file mode 100755 index 0000000..bc376b5 --- /dev/null +++ b/init.d/chrony @@ -0,0 +1,73 @@ +#! /bin/sh +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for Debian by Christoph Lameter +# Modified for chrony by John Hasler 1998-2012 +# Modified for Debian by Vincent Blut + +### BEGIN INIT INFO +# Provides: chrony +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Should-Start: $syslog $network $named $time +# Should-Stop: $syslog $network $named $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Controls chronyd NTP time daemon +# Description: Chronyd is the NTP time daemon in the Chrony package +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/chronyd +NAME="chronyd" +DESC="time daemon" +PIDFILE=/run/chronyd.pid +CHRONY_HELPER=/usr/lib/chrony/chrony-helper + +[ -x "$DAEMON" ] || exit 0 + +. /lib/lsb/init-functions + +# Override this variable by editing /etc/default/chrony. +DAEMON_OPTS="" +if [ -f /etc/default/chrony ]; then + . /etc/default/chrony +fi + +case "$1" in + start) + if $0 status > /dev/null ; then + log_success_msg "$NAME is already running" + else + log_daemon_msg "Starting $DESC" "$NAME" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + if [ -x $CHRONY_HELPER ]; then + $CHRONY_HELPER update-daemon + fi + log_end_msg $? + fi + ;; + + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --remove-pidfile --exec $DAEMON + log_end_msg $? + ;; + + restart|force-reload) + $0 stop + $0 start + ;; + + status) + status_of_proc -p $PIDFILE "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + + *) + log_action_msg "Usage: /etc/init.d/chrony {start|stop|restart|force-reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/logrotate.d/chrony b/logrotate.d/chrony new file mode 100644 index 0000000..2823a1a --- /dev/null +++ b/logrotate.d/chrony @@ -0,0 +1,8 @@ +/var/log/chrony/*.log { + missingok + nocreate + sharedscripts + postrotate + /usr/bin/chronyc cyclelogs > /dev/null 2>&1 || true + endscript +} diff --git a/network/if-post-down.d/chrony b/network/if-post-down.d/chrony new file mode 100755 index 0000000..1b29577 --- /dev/null +++ b/network/if-post-down.d/chrony @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +[ -x /usr/sbin/chronyd ] || exit 0 + +if [ -e /run/chronyd.pid ] && ! ip r 2> /dev/null | grep -q '^default'; then + chronyc offline > /dev/null 2>&1 +fi + +exit 0 diff --git a/network/if-up.d/chrony b/network/if-up.d/chrony new file mode 100755 index 0000000..90622b8 --- /dev/null +++ b/network/if-up.d/chrony @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +[ -x /usr/sbin/chronyd ] || exit 0 + +if [ -e /run/chronyd.pid ] && + ip r list dev $IFACE 2> /dev/null | grep -q '^default'; then + chronyc online > /dev/null 2>&1 +fi + +exit 0 diff --git a/passwd b/passwd index cf081c3..0658191 100644 --- a/passwd +++ b/passwd @@ -59,3 +59,4 @@ kameu:x:1001:100:Karin Meusel:/home/kameu:/bin/bash mysql:x:128:140:MySQL Server:/nonexistent:/bin/false smbguest:x:1125:1001:Samba guest account:/dev/null:/dev/null plex:x:136:963:Plex Media Server:/var/lib/plexmediaserver:/bin/bash +_chrony:x:129:142:Chrony daemon,,,:/var/lib/chrony:/usr/sbin/nologin diff --git a/passwd- b/passwd- index 0daf925..3cd2259 100644 --- a/passwd- +++ b/passwd- @@ -58,3 +58,5 @@ vivi:x:1006:100:Vivien Musterer:/home/vivi:/bin/bash kameu:x:1001:100:Karin Meusel:/home/kameu:/bin/bash mysql:x:128:140:MySQL Server:/nonexistent:/bin/false smbguest:x:1125:1001:Samba guest account:/dev/null:/dev/null +plex:x:136:963:Plex Media Server:/var/lib/plexmediaserver:/bin/bash +_chrony:x:129:142::/var/lib/chrony:/usr/sbin/nologin diff --git a/ppp/ip-down.d/chrony b/ppp/ip-down.d/chrony new file mode 100755 index 0000000..c8b776b --- /dev/null +++ b/ppp/ip-down.d/chrony @@ -0,0 +1,13 @@ +#!/bin/sh +# This script tells chronyd that the connection is down +# so that it won't try to contact the server. +# John Hasler 1998-2003 +# Any possessor of a copy of this program may treat it as if it +# were in the public domain. I waive all rights. +# Modified by Vincent Blut + +if [ -e /run/chronyd.pid ] && ! ip r 2> /dev/null | grep -q '^default'; then + chronyc offline > /dev/null 2>&1 +fi + +exit 0 diff --git a/ppp/ip-up.d/chrony b/ppp/ip-up.d/chrony new file mode 100755 index 0000000..d450452 --- /dev/null +++ b/ppp/ip-up.d/chrony @@ -0,0 +1,12 @@ +#!/bin/sh +# This script tells chronyd that the connection is up so that it can +# contact the server. John Hasler 1998-2003 +# Any possessor of a copy of this program may treat it as if it +# were in the public domain. I waive all rights. +# Modified by Vincent Blut + +if [ -e /run/chronyd.pid ] && ip r 2> /dev/null | grep -q '^default'; then + chronyc online > /dev/null 2>&1 +fi + +exit 0 diff --git a/rc0.d/K01chrony b/rc0.d/K01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc0.d/K01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc1.d/K01chrony b/rc1.d/K01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc1.d/K01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc2.d/S01chrony b/rc2.d/S01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc2.d/S01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc3.d/S01chrony b/rc3.d/S01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc3.d/S01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc4.d/S01chrony b/rc4.d/S01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc4.d/S01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc5.d/S01chrony b/rc5.d/S01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc5.d/S01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/rc6.d/K01chrony b/rc6.d/K01chrony new file mode 120000 index 0000000..53f1361 --- /dev/null +++ b/rc6.d/K01chrony @@ -0,0 +1 @@ +../init.d/chrony \ No newline at end of file diff --git a/shadow b/shadow index f1391f5..de0f2db 100644 --- a/shadow +++ b/shadow @@ -59,3 +59,4 @@ kameu:$6$5h/eHwOt$vHYM0Cxc6GsFbNjm5J4cdqjvmok6Ce9tSnP5Ox8MwDBHJ/ldTIId1ZGs4k8pa1 mysql:!:17722:0:99999:7::: smbguest:!:17723:0:99999:7::: plex:!:17743:0:99999:7::: +_chrony:*:17751:0:99999:7::: diff --git a/shadow- b/shadow- index 97e56f7..de0f2db 100644 --- a/shadow- +++ b/shadow- @@ -50,7 +50,7 @@ doris:$6$aaBD.v4x$kR6SRHU0BmEMnK5SVaU/UcHl.xw.pfq7naPf8Wb6xkA4c1ENK.9XKvc/Tj5iF4 davis:$6$k0oYWtBJ$tWzq/wKmRSxNN90ibDQ1Psd2MqcA0KgYAFl/N0KNIr.0oz2vpRSG/xUVX4j6ubOwB1MEG8UI9bIgs9D3Y5row.:16972:0:99999:7::: gast:$6$YvNBr9hC$KQPyvJrvdrABSFCxXVMc3sGMeq8dToHzjJuKvzmyQFjYAwmSHcXyuqLy3IxaWeAEsJZxvOXFivkISk2hJ0ucS0:17320:0:99999:7::: heiko:$6$H4HqXLQP$C8z9qeK1thF1pEN.ABVIghuRwNU4eIVBLbEo3N7RcnEebwNevoulYo.mGH/tXcEfnE2WsVTILMpPH1FHKD5AK/:15590:0:99999:7::: -patrick:$1$GLbMMbFN$CAnFjqpvABrKPsMgioPbx0:14147:0:99999:7::: +patrick:$6$KBfaWiff$x3l.ZpC5JokbgmK1cVshDS4dvtIfryJtfT4PJdwORV2nSOKjK774Edp9q1XdIBOtINVIeTZYg7QfzFQ2FL41G1:17747:0:99999:7::: robert:$1$3dN7L0X7$wjwYf5TMs4XAzX8yA8iRz0:14147:0:99999:7::: steffen:$6$l6EVLY86$j9aCQ8smEOrsH/ccQM1r.qQXZxCBazpcCxQe0e1LKYl5oycf7gcBWB.Bx5kqw5gqS7MkiKik69TEAObmPNXfy0:14772:0:99999:7::: thomas:!$1$TnH.ZwKd$6fG79iLoCvVzMC5DGSzmL.:14147:0:99999:7::: @@ -58,3 +58,5 @@ vivi:$1$E5UMs24X$g/xNaGJFgTK1uB9xVZOGc1:14147:0:99999:7::: kameu:$6$5h/eHwOt$vHYM0Cxc6GsFbNjm5J4cdqjvmok6Ce9tSnP5Ox8MwDBHJ/ldTIId1ZGs4k8pa1OPgtMuw1yxvrwkAlvPrkJwQ/:17722:0:99999:7::: mysql:!:17722:0:99999:7::: smbguest:!:17723:0:99999:7::: +plex:!:17743:0:99999:7::: +_chrony:*:17751:0:99999:7::: diff --git a/systemd/system/chronyd.service b/systemd/system/chronyd.service new file mode 120000 index 0000000..cf434ea --- /dev/null +++ b/systemd/system/chronyd.service @@ -0,0 +1 @@ +/lib/systemd/system/chrony.service \ No newline at end of file diff --git a/systemd/system/multi-user.target.wants/chrony.service b/systemd/system/multi-user.target.wants/chrony.service new file mode 120000 index 0000000..cf434ea --- /dev/null +++ b/systemd/system/multi-user.target.wants/chrony.service @@ -0,0 +1 @@ +/lib/systemd/system/chrony.service \ No newline at end of file diff --git a/systemd/system/ntp-systemd-netif.path b/systemd/system/ntp-systemd-netif.path new file mode 120000 index 0000000..dc1dc0c --- /dev/null +++ b/systemd/system/ntp-systemd-netif.path @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/systemd/system/ntp.service b/systemd/system/ntp.service new file mode 120000 index 0000000..dc1dc0c --- /dev/null +++ b/systemd/system/ntp.service @@ -0,0 +1 @@ +/dev/null \ No newline at end of file -- 2.39.5