From: Frank Brehm Date: Mon, 16 Sep 2024 08:24:07 +0000 (+0200) Subject: committing changes in /etc made by "apt-get install --yes --no-install-recommends... X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=8821f704131dba6bed86c30bea321bfe1c375b15;p=config%2Fbruni%2Fetc-mint-new1.git committing changes in /etc made by "apt-get install --yes --no-install-recommends celluloid fonts-noto-core gnome-online-accounts-gtk hplip hypnotix pipewire-alsa pipewire-audio pipewire-pulse simple-scan systemd-timesyncd wireplumber xapp-jxl-thumbnailer xcvt yt-dlp zstd nemo-preview" Packages with configuration changes: +systemd-timesyncd 255.4-1ubuntu8.4 amd64 Package changes: +libjxl-tools 0.7.0-10.2ubuntu6 amd64 +libmusicbrainz5-2 5.1.0+git20150707-10build2 amd64 +libmusicbrainz5cc2v5 5.1.0+git20150707-10build2 amd64 +libneon27t64-gnutls 0.33.0-1.1build3 amd64 +libtcmalloc-minimal4t64 2.15-3build1 amd64 +nemo-preview 6.2.0+wilma amd64 +systemd-timesyncd 255.4-1ubuntu8.4 amd64 +xapp-jxl-thumbnailer 1.2.5 all +xapp-thumbnailers-common 1.2.5 all --- diff --git a/.etckeeper b/.etckeeper index 510fc3a..2400468 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1661,6 +1661,7 @@ maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/chrony' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntpsec-ntpdate' maybe chmod 0755 'dhcp/dhclient-exit-hooks.d/resolved' maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes' +maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/timesyncd' maybe chmod 0755 'dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd' maybe chmod 0644 'dhcp/dhclient.conf' maybe chmod 0644 'dhcpcd.conf' @@ -2254,7 +2255,7 @@ maybe chmod 0755 'init.d/atd' maybe chmod 0755 'init.d/binfmt-support' maybe chmod 0755 'init.d/bluetooth' maybe chmod 0755 'init.d/cgroupfs-mount' -maybe chmod 0755 'init.d/chrony' +maybe chmod 0644 'init.d/chrony' maybe chmod 0755 'init.d/console-setup.sh' maybe chmod 0755 'init.d/cron' maybe chmod 0755 'init.d/cryptdisks' @@ -3444,6 +3445,7 @@ maybe chmod 0755 'systemd/system/zfs-mount.service.wants' maybe chmod 0755 'systemd/system/zfs-share.service.wants' maybe chmod 0755 'systemd/system/zfs-volumes.target.wants' maybe chmod 0755 'systemd/system/zfs.target.wants' +maybe chmod 0644 'systemd/timesyncd.conf' maybe chmod 0755 'systemd/user' maybe chmod 0644 'systemd/user.conf' maybe chmod 0755 'systemd/user/default.target.wants' diff --git a/dhcp/dhclient-exit-hooks.d/timesyncd b/dhcp/dhclient-exit-hooks.d/timesyncd new file mode 100644 index 0000000..456deb2 --- /dev/null +++ b/dhcp/dhclient-exit-hooks.d/timesyncd @@ -0,0 +1,52 @@ +TIMESYNCD_CONF=/run/systemd/timesyncd.conf.d/01-dhclient.conf + +timesyncd_servers_setup_remove() { + if [ ! -d /run/systemd/system ]; then + return + fi + if [ ! -x /usr/lib/systemd/systemd-timesyncd ]; then + return + fi + + if [ -e $TIMESYNCD_CONF ]; then + rm -f $TIMESYNCD_CONF + systemctl try-restart systemd-timesyncd.service || true + fi +} + +timesyncd_servers_setup_add() { + if [ ! -d /run/systemd/system ]; then + return + fi + if [ ! -x /usr/lib/systemd/systemd-timesyncd ]; then + return + fi + + if [ -e $TIMESYNCD_CONF ] && [ "$new_ntp_servers" = "$old_ntp_servers" ]; then + return + fi + + if [ -z "$new_ntp_servers" ]; then + timesyncd_servers_setup_remove + return + fi + + mkdir -p $(dirname $TIMESYNCD_CONF) + cat < ${TIMESYNCD_CONF}.new +# NTP server entries received from DHCP server +[Time] +NTP=$new_ntp_servers +EOF + mv ${TIMESYNCD_CONF}.new ${TIMESYNCD_CONF} + systemctl try-restart systemd-timesyncd.service || true +} + + +case $reason in + BOUND|RENEW|REBIND|REBOOT) + timesyncd_servers_setup_add + ;; + EXPIRE|FAIL|RELEASE|STOP) + timesyncd_servers_setup_remove + ;; +esac diff --git a/init.d/chrony b/init.d/chrony old mode 100755 new mode 100644 diff --git a/systemd/system/dbus-org.freedesktop.timesync1.service b/systemd/system/dbus-org.freedesktop.timesync1.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/systemd/system/dbus-org.freedesktop.timesync1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/systemd/system/sysinit.target.wants/systemd-timesyncd.service b/systemd/system/sysinit.target.wants/systemd-timesyncd.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/systemd/system/sysinit.target.wants/systemd-timesyncd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/systemd/timesyncd.conf b/systemd/timesyncd.conf new file mode 100644 index 0000000..9326caf --- /dev/null +++ b/systemd/timesyncd.conf @@ -0,0 +1,26 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/timesyncd.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/timesyncd.conf' to display the full config. +# +# See timesyncd.conf(5) for details. + +[Time] +#NTP= +#FallbackNTP=ntp.ubuntu.com +#RootDistanceMaxSec=5 +#PollIntervalMinSec=32 +#PollIntervalMaxSec=2048 +#ConnectionRetrySec=30 +#SaveIntervalSec=60