From ac8399db6ce846597966360732ce6d39a247bdd2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:25:51 +0200 Subject: Adding debian version 241-7~deb10u8. Signed-off-by: Daniel Baumann --- debian/systemd.postinst | 173 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 debian/systemd.postinst (limited to 'debian/systemd.postinst') diff --git a/debian/systemd.postinst b/debian/systemd.postinst new file mode 100644 index 0000000..15d4fd5 --- /dev/null +++ b/debian/systemd.postinst @@ -0,0 +1,173 @@ +#! /bin/sh + +set -e + +_systemctl() { + if [ -d /run/systemd/system ]; then + systemctl "$@" + fi +} + +_update_catalog() { + journalctl --update-catalog || true +} + +# Update Message Catalogs database and reload in response to dpkg triggers +if [ "$1" = "triggered" ]; then + shift + for trigger in "$@"; do + case $trigger in + /usr/lib/systemd/catalog) + _update_catalog + ;; + /etc/init.d) + _systemctl daemon-reload || true + ;; + esac + done + exit 0 +fi + +# Enable getty and remote-fs.target by default on new installs +if [ -z "$2" ]; then + systemctl enable getty@tty1.service || true + systemctl enable remote-fs.target || true +fi + +# Enable timesyncd by default on new installs installs and upgrades +if dpkg --compare-versions "$2" lt "218-11~"; then + systemctl enable systemd-timesyncd.service || true +fi + +# Enable ondemand by default on new installs installs and upgrades +if [ -e /lib/systemd/system/ondemand.service ] && dpkg --compare-versions "$2" lt "231-7~"; then + systemctl enable ondemand.service || true +fi + +# Do a one-time migration of the local time setting +if [ -z "$2" ]; then + if [ -f /etc/default/rcS ]; then + . /etc/default/rcS + fi + if [ "$UTC" = "no" ] && [ ! -e /etc/adjtime ]; then + printf "0.0 0 0.0\n0\nLOCAL\n" > /etc/adjtime + fi +fi + +# Do a one-time migration of the TMPTIME setting +if [ -z "$2" ]; then + if [ -f /etc/default/rcS ]; then + . /etc/default/rcS + fi + if [ ! -e /etc/tmpfiles.d/tmp.conf ]; then + case "$TMPTIME" in + -*|infinite|infinity) + cat > /etc/tmpfiles.d/tmp.conf < /dev/null || true + done +fi + +if dpkg --compare-versions "$2" lt-nl "235-3~"; then + # systemd-bus-proxyd got dropped before stretch, and never created any file + deluser --system systemd-bus-proxy || true +fi + +if dpkg --compare-versions "$2" lt-nl "236-1~"; then + # Clean up old /var/lib/systemd/clock on upgrade. + # The clock file used by systemd-timesyncd is now stored in + # StateDirectory=systemd/timesync. + rm -f /var/lib/systemd/clock +fi + +if dpkg --compare-versions "$2" lt-nl "239-12~"; then + # clean up bogus "nobody" group from #912525; ensure that it's a system group + if getent group nobody >/dev/null; then + delgroup --system nobody || true + fi +fi + +#DEBHELPER# -- cgit v1.2.3