]> Frank Brehm's Git Trees - config/bruni/etc-mint-new1.git/commitdiff
committing changes in /etc made by "apt-get install --yes --no-install-recommends...
authorFrank Brehm <frank@brehm-online.com>
Mon, 16 Sep 2024 08:24:07 +0000 (10:24 +0200)
committerFrank Brehm <root@bruni.home.brehm-online.com>
Mon, 16 Sep 2024 08:24:07 +0000 (10:24 +0200)
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

.etckeeper
dhcp/dhclient-exit-hooks.d/timesyncd [new file with mode: 0644]
init.d/chrony [changed mode: 0755->0644]
systemd/system/dbus-org.freedesktop.timesync1.service [new symlink]
systemd/system/sysinit.target.wants/systemd-timesyncd.service [new symlink]
systemd/timesyncd.conf [new file with mode: 0644]

index 510fc3a6f16bc71566d89b92c1519de084a7a220..240046828c2d42f117d7946105ed882578cea455 100755 (executable)
@@ -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 (file)
index 0000000..456deb2
--- /dev/null
@@ -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 <<EOF > ${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
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/systemd/system/dbus-org.freedesktop.timesync1.service b/systemd/system/dbus-org.freedesktop.timesync1.service
new file mode 120000 (symlink)
index 0000000..cd00411
--- /dev/null
@@ -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 (symlink)
index 0000000..cd00411
--- /dev/null
@@ -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 (file)
index 0000000..9326caf
--- /dev/null
@@ -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